Configures the code-coverage reporter
351497
function configureCodeCoverage (config) {
  if (process.argv.indexOf("--coverage") === -1) {
    console.warn("Code-coverage is not enabled");
    return;
  }

  config.reporters.push("coverage");
  config.coverageReporter = {
    reporters: [
      { type: "text-summary" },
      { type: "lcov" }
    ]
  };

  config.files = config.files.map(function (file) {
    if (typeof file === "string") {
      file = file.replace(/^dist\/(.*)\.min\.js$/, "dist/$1.coverage.js");
    }
    return file;
  });
}
547607
private void configure(Object obj, XmlParser.Node cfg, int i) throws ClassNotFoundException,
            NoSuchMethodException, InvocationTargetException, IllegalAccessException
    {
        XmlParser.Node node = null;
        try
        {
            for (; i < cfg.size(); i++)
            {
                Object o = cfg.get(i);
                if (o instanceof String) continue;
                node = (XmlParser.Node) o;

                String tag = node.getTag();
                if ("Set".equals(tag))
                    set(obj, node);
                else if ("Put".equals(tag))
                    put(obj, node);
                else if ("Call".equals(tag))
                    call(obj, node);
                else if ("Get".equals(tag))
                    get(obj, node);
                else if ("New".equals(tag))
                    newObj(obj, node);
                else if ("Ref".equals(tag))
                    refObj(obj, node);
                else
                    throw new IllegalStateException("Unknown tag: " + tag);
            }
        }
        catch(InvocationTargetException e)
        {
            log.warn("Exception at "+node.toString(),e.getTargetException());
            throw e;
        }
        catch (Error e)
        {
            log.debug(node);
            throw e;
        }
        catch (Exception e)
        {
            log.debug(node);
            if (e instanceof NoSuchMethodException) throw (NoSuchMethodException) e;
            if (e instanceof InvocationTargetException) throw (InvocationTargetException) e;
            if (e instanceof IllegalAccessException) throw (IllegalAccessException) e;
            if (e instanceof RuntimeException) throw (RuntimeException) e;
        }
    }
259507
def coverage():
    """"""
    run("coverage run --source {PROJECT_NAME} -m py.test".format(PROJECT_NAME=PROJECT_NAME))
    run("coverage report -m")
    run("coverage html")

    webbrowser.open('file://' + os.path.realpath("htmlcov/index.html"), new=2)
137097
private void configure(){
		addDecorator(ServiceStats.class, new ServiceStatsDecorator());
		addDecorator(ActionStats.class, new ActionStatsDecorator());
		addDecorator(ServletStats.class, new ServletStatsDecorator());
		addDecorator(FilterStats.class, new FilterStatsDecorator());
		addDecorator(CacheStats.class, new CacheStatsDecorator());
		addDecorator(StorageStats.class, new StorageStatsDecorator());
		addDecorator(MemoryStats.class, new MemoryStatsDecorator());
		addDecorator(MemoryPoolStats.class, new MemoryPoolStatsDecorator());
		addDecorator(VirtualMemoryPoolStats.class, new MemoryPoolStatsDecorator("VirtualMemoryPool"));
		addDecorator(ThreadCountStats.class, new ThreadCountDecorator());
		addDecorator(ThreadStateStats.class, new ThreadStatesDecorator());
		addDecorator(OSStats.class, new OSStatsDecorator());
		addDecorator(RuntimeStats.class, new RuntimeStatsDecorator());
		addDecorator(PageInBrowserStats.class, new PageInBrowserStatsDecorator());
		addDecorator(ErrorStats.class, new ErrorStatsDecorator());
		addDecorator(GCStats.class, new GCStatsDecorator());

		//counters
		addDecorator(CounterStats.class, new CounterStatsDecorator());
		addDecorator(MaleFemaleStats.class, new MaleFemaleStatsDecorator());
		addDecorator(GuestBasicPremiumStats.class, new GuestBasicPremiumStatsDecorator());

		//session
		addDecorator(SessionCountStats.class, new SessionCountDecorator());
	}
1088786
private void configureJMXetricAgent() throws XPathExpressionException,
			Exception {
		// Gets the config for the samplers
		NodeList samples = getXmlNodeList("/jmxetric-config/sample",
				inputSource);
		for (int i = 0; i < samples.getLength(); i++) {
			Node sample = samples.item(i);
			MBeanSampler mbSampler = makeMBeanSampler(sample);
			agent.addSampler(mbSampler);
		}
	}
174601
@Override
    protected void configure() {

        // Create HK2 service locator and bind jersey injections
        ServiceLocator locator = ServiceLocatorFactory.getInstance().create(null);
        bind(ServiceLocator.class).toInstance(locator);

        bind(VertxContainer.class).to(DefaultVertxContainer.class);
        bind(JerseyServer.class).to(GuiceJerseyServer.class);
        bind(JerseyHandler.class).to(DefaultJerseyHandler.class);
        bind(JerseyOptions.class).to(DefaultJerseyOptions.class);
        bind(JerseyServerOptions.class).to(DefaultJerseyOptions.class);
        bind(ContainerResponseWriterProvider.class).to(VertxResponseWriterProvider.class);
        bind(MessageBodyWriter.class).to(WriteStreamBodyWriter.class).in(Singleton.class);
        bind(ApplicationConfigurator.class).toProvider(Providers.of(null));

        Multibinder.newSetBinder(binder(), VertxRequestProcessor.class);
        Multibinder.newSetBinder(binder(), VertxResponseProcessor.class);
        Multibinder.newSetBinder(binder(), VertxPostResponseProcessor.class);

        Multibinder.newSetBinder(binder(), ContainerRequestFilter.class);
        Multibinder.newSetBinder(binder(), ContainerResponseFilter.class);
        Multibinder.newSetBinder(binder(), ReaderInterceptor.class);
        Multibinder.newSetBinder(binder(), WriterInterceptor.class);
        Multibinder.newSetBinder(binder(), ModelProcessor.class);
        Multibinder.newSetBinder(binder(), ContainerLifecycleListener.class);
        Multibinder.newSetBinder(binder(), ApplicationEventListener.class);
        Multibinder.newSetBinder(binder(), ExceptionMapper.class);

    }
1308915
private void configureCustomFields()
   {
      CustomFieldContainer customFields = m_projectFile.getCustomFields();

      // If the caller hasn't already supplied a value for this field
      if (m_activityIDField == null)
      {
         m_activityIDField = (TaskField) customFields.getFieldByAlias(FieldTypeClass.TASK, "Code");
         if (m_activityIDField == null)
         {
            m_activityIDField = TaskField.WBS;
         }
      }

      // If the caller hasn't already supplied a value for this field
      if (m_activityTypeField == null)
      {
         m_activityTypeField = (TaskField) customFields.getFieldByAlias(FieldTypeClass.TASK, "Activity Type");
      }
   }
1239451
private void init(WebDriver driver, Reporter reporter) {
        this.driver = driver;
        this.reporter = reporter;

        App app = null;
        if (reporter != null) {
            app = reporter.getApp();
        }

        is = new Is(this);
        get = new Get(app, driver, this);
        verifyState = new VerifyState(this, reporter);
        assertState = new AssertState(this, reporter);
        waitForState = new WaitForState(this, reporter);
        verifyContains = new VerifyContains(this, reporter);
        assertContains = new AssertContains(this, reporter);
        verifyExcludes = new VerifyExcludes(this, reporter);
        assertExcludes = new AssertExcludes(this, reporter);
        verifyEquals = new VerifyEquals(this, reporter);
        assertEquals = new AssertEquals(this, reporter);
        waitForEquals = new WaitForEquals(this, reporter);
        verifyMatches = new VerifyMatches(this, reporter);
        assertMatches = new AssertMatches(this, reporter);
    }
319156
def coverage():
    """"""
    # Note: coverage options are controlled by .coveragerc file
    install()
    test_setup()
    sh("%s -m coverage run %s" % (PYTHON, TEST_SCRIPT))
    sh("%s -m coverage report" % PYTHON)
    sh("%s -m coverage html" % PYTHON)
    sh("%s -m webbrowser -t htmlcov/index.html" % PYTHON)
547717
protected function configure()
	{
		$this->setName( self::$defaultName );
		$this->setDescription( 'Clears the content cache' );
		$this->addArgument( 'site', InputArgument::OPTIONAL, 'Site codes to clear the cache like "default unittest" (none for all)' );
	}
916030
@Inject
    public void setReporterConfiguration(@Nullable JaegerReporterConfiguration reporterConfiguration) {
        if (reporterConfiguration != null) {
            configuration.withReporter(reporterConfiguration.configuration);
        }
    }
15803
def show(self):
        

        RuntimeGlobals.splashscreen and RuntimeGlobals.splashscreen.hide()

        super(Reporter, self).show()

        self.raise_()
198836
def setup_coverage(config, kernel, floc, output_loc=None):
    

    language = kernel.language
    if language.startswith('python'):
        # Get the pytest-cov coverage object
        cov = get_cov(config)
        if cov:
            # If present, copy the data file location used by pytest-cov
            data_file = os.path.abspath(cov.config.data_file)
        else:
            # Fall back on output_loc and current dir if not
            data_file = os.path.abspath(os.path.join(output_loc or os.getcwd(), '.coverage'))

        # Get options from pytest-cov's command line arguments:
        source = config.option.cov_source
        config_file = config.option.cov_config
        if isinstance(config_file, str) and os.path.isfile(config_file):
            config_file = os.path.abspath(config_file)

        # Copy the suffix of plugin if available
        suffix = _make_suffix(cov)
        if suffix is True:
            # Cannot merge data with autogen suffix, so turn off warning
            # for missing data in pytest-cov collector
            cov._warn_no_data = False

        # Build setup command and execute in kernel:
        cmd = _python_setup % (data_file, source, config_file, suffix)
        msg_id = kernel.kc.execute(cmd, stop_on_error=False)
        kernel.await_idle(msg_id, 60)  # A minute should be plenty to enable coverage
    else:
        config.warn(
            'C1',
            'Coverage currently not supported for language "%s".' % language,
            floc)
        return
101168
public void configure(CompilerConfiguration configuration) {
        super.configure(configuration);
        this.debug = configuration.getDebug();

        if (!this.configured && this.classLoader instanceof GroovyClassLoader) {
            appendCompilerConfigurationClasspathToClassLoader(configuration, (GroovyClassLoader) this.classLoader);
        }

        this.configured = true;
    }
605829
public function generateReport(\PHP_CodeCoverage $coverage)
    {
        $format = $this->config['report']['format'];
        $options = $this->config['report']['options'];

        $report = $this->factory->create($format, $options);
        $report->process($coverage);
    }
372092
function Reporter(runner) {
    Base.call(this, runner);

    var self = this;
    var stats = this.stats;
    var indents = 0;
    var n = 0;

    var root = new Suite();
    var stack = [root];

    var options = {
        dest: './'
    };
    for (var p in options) {
        if (typeof process.env['mocha-json-spec-' + p] === 'string') {
            options[p] = process.env['mocha-json-spec-' + p];
        } else if (typeof process.env['MOCHA_JSON_SPEC_' + p.toUpperCase()] === 'string') {
            options[p] = process.env['MOCHA_JSON_SPEC_' + p.toUpperCase()];
        }
    }

    function indent() {
        return Array(indents).join('  ')
    }

    runner.on('start', function() {
        console.log();
    });

    runner.on('suite', function(suite) {
        ++indents;
        console.log(color('suite', '%s%s'), indent(), suite.title);
        if (suite.root) {
            return;
        }
        var parent = top(stack);
        var child = new Suite(suite);
        parent.suites.push(child);
        stack.push(child);
    });

    runner.on('suite end', function(suite) {
        --indents;
        if (1 == indents) {
            console.log();
        }
        stack.pop();
    });

    runner.on('test end', function(test) {
        top(stack).tests.push(new Test(test));
    });

    runner.on('pending', function(test) {
        var fmt = indent() + color('pending', '  - %s');
        console.log(fmt, test.title);
    });

    runner.on('pass', function(test) {
        if ('fast' == test.speed) {
            var fmt = indent() + color('checkmark', '  ' + Base.symbols.ok) + color('pass', ' %s ');
            cursor.CR();
            console.log(fmt, test.title);
        } else {
            var fmt = indent() + color('checkmark', '  ' + Base.symbols.ok) + color('pass', ' %s ') + color(test.speed, '(%dms)');
            cursor.CR();
            console.log(fmt, test.title, test.duration);
        }
        var current = top(stack);
    });

    runner.on('fail', function(test) {
        cursor.CR();
        console.log(indent() + color('fail', '  %d) %s'), ++n, test.title);
    });

    runner.on('end', function() {

        // Epilogue
        var fmt;
        try {
            console.log(color('bright yellow', '  Summary'));

            // Passes
            fmt = color('bright pass', ' ');
            fmt += color('green', ' %d passing');
            fmt += color('light', ' (%s)');
            console.log(fmt, stats.passes || 0, ms(stats.duration));

            // Pending
            if (stats.pending) {
                fmt = color('pending', ' ');
                fmt += color('pending', ' %d pending');
                console.log(fmt, stats.pending);
            }

            // Failures
            if (stats.failures) {
                fmt = color('fail', '  %d failing');
                console.error(fmt, stats.failures);
                Base.list(self.failures);
                console.error();
            } else {
                console.log();
            }
        } catch (error) {
            console.log(color('fail', 'Error occurred when generating epilogue'));
            console.log(error);
        }


        // Json        
        var obj = {
            stats: self.stats,
            results: root
        };
        try {
            console.log(color('bright yellow', '  Export'));
            var dir = fspath.dirname(options.dest);
            var str = JSON.stringify(obj, null, 2);
            mkdirp.sync(dir);
            fs.writeFileSync(options.dest, str);
            console.log(color('green', '  Successfully written to %s'), options.dest);
        } catch (error) {
            console.log(color('fail', '  Failed to export to %s'), options.dest);
            console.log(error);
        }

        // Add extra space
        console.log();
    });
}
376781
@Override
    protected void configure() {

        bind(ChannelService.class).to(ChannelServiceImpl.class);
        bind(MonitoringService.class).to(MonitoringServiceImpl.class);

        bind(TimestampProvider.class).to(SystemTimeProvider.class);

        bind(ChannelAssignmentStrategy.class).to(RoundRobinAssignmentStrategy.class);
    }