Examples of RuntimeData


Examples of org.jacoco.core.runtime.RuntimeData

    source = Source.getSourceFor(target);
  }

  private ExecutionDataStore execute(final ClassReader reader)
      throws Exception {
    RuntimeData data = new RuntimeData();
    IRuntime runtime = new SystemPropertiesRuntime();
    runtime.startup(data);
    final byte[] bytes = new Instrumenter(runtime).instrument(reader);
    run(loader.add(target, bytes));
    final ExecutionDataStore store = new ExecutionDataStore();
    data.collect(store, new SessionInfoStore(), false);
    runtime.shutdown();
    return store;
  }
View Full Code Here

Examples of org.jacoco.core.runtime.RuntimeData

    final byte[] instrumented = instr.instrument(
        getTargetClass(targetName), targetName);

    // Now we're ready to run our instrumented class and need to startup the
    // runtime first:
    final RuntimeData data = new RuntimeData();
    runtime.startup(data);

    // In this tutorial we use a special class loader to directly load the
    // instrumented class definition from a byte[] instances.
    final MemoryClassLoader memoryClassLoader = new MemoryClassLoader();
    memoryClassLoader.addDefinition(targetName, instrumented);
    final Class<?> targetClass = memoryClassLoader.loadClass(targetName);

    // Here we execute our test target class through its Runnable interface:
    final Runnable targetInstance = (Runnable) targetClass.newInstance();
    targetInstance.run();

    // At the end of test execution we collect execution data and shutdown
    // the runtime:
    final ExecutionDataStore executionData = new ExecutionDataStore();
    final SessionInfoStore sessionInfos = new SessionInfoStore();
    data.collect(executionData, sessionInfos, false);
    runtime.shutdown();

    // Together with the original class definition we can calculate coverage
    // information:
    final CoverageBuilder coverageBuilder = new CoverageBuilder();
View Full Code Here

Examples of org.jacoco.core.runtime.RuntimeData

  @Before
  @Override
  public void setup() throws Exception {
    super.setup();
    mockConnection = new MockSocketConnection();
    data = new RuntimeData();
  }
View Full Code Here

Examples of org.jacoco.core.runtime.RuntimeData

      protected Socket createSocket(AgentOptions options)
          throws IOException {
        return con.getSocketA();
      }
    };
    data = new RuntimeData();
    controller.startup(new AgentOptions(), data);
    remoteReader = new RemoteControlReader(remoteSocket.getInputStream());
  }
View Full Code Here

Examples of org.jacoco.core.runtime.RuntimeData

      protected ServerSocket createServerSocket(AgentOptions options)
          throws IOException {
        return serverSocket;
      }
    };
    data = new RuntimeData();
    controller.startup(options, data);
  }
View Full Code Here

Examples of org.jamesii.core.plugins.metadata.file.RuntimeData

public class TestRuntimeDataSerializability extends
    SimpleSerializationTest<RuntimeData> {

  @Override
  public RuntimeData getTestObject() throws Exception {
    return new RuntimeData(null, null, null);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.