Package org.apache.qpid.disttest.controller

Examples of org.apache.qpid.disttest.controller.ResultsForAllTests


                controller.setConfig(testConfig);

                controller.awaitClientRegistrations();

                LOGGER.info("Running test : " + testConfigFile);
                ResultsForAllTests testResult = runTest(controller, testConfigFile);
                results.add(testResult);
            }

            _resuResultsFileWriter.writeResultsSummary(results);
        }
View Full Code Here


    private ResultsForAllTests runTest(Controller controller, String testConfigFile)
    {
        final Config testConfig = buildTestConfigFrom(testConfigFile);
        controller.setConfig(testConfig);

        ResultsForAllTests rawResultsForAllTests = controller.runAllTests();
        ResultsForAllTests resultsForAllTests = _aggregator.aggregateResults(rawResultsForAllTests);

        _resuResultsFileWriter.writeResultsToFile(resultsForAllTests, testConfigFile);
        return resultsForAllTests;
    }
View Full Code Here

    private void runTest(Controller controller, String testConfigFile)
    {
        final Config testConfig = buildTestConfigFrom(testConfigFile);
        controller.setConfig(testConfig);

        ResultsForAllTests rawResultsForAllTests = controller.runAllTests();
        ResultsForAllTests resultsForAllTests = _aggregator.aggregateResults(rawResultsForAllTests);

        String outputDir = getCliOptions().get(ControllerRunner.OUTPUT_DIR_PROP);
        final String outputFile = _configFileHelper.generateOutputCsvNameFrom(testConfigFile, outputDir);
        writeResultsToFile(resultsForAllTests, outputFile);
    }
View Full Code Here

        when(participantResult.getParticipantName()).thenReturn(PARTICIPANT);

        TestResult testResult = new TestResult(TEST1);
        testResult.addParticipantResult(participantResult);

        ResultsForAllTests resultsForAllTests = new ResultsForAllTests();
        resultsForAllTests.add(testResult);

        String output = _formatter.format(resultsForAllTests);

        String expectedOutput = readCsvOutputFileAsString("expectedOutput.csv");
View Full Code Here

        _controller.setConfig(config);
        final Client client1 = new Client(new ClientJmsDelegate(_context));
        final Thread client1Thread = createBackgroundClientThread(client1);
        _controller.awaitClientRegistrations();

        ResultsForAllTests results = _controller.runAllTests();
        _controller.stopAllRegisteredClients();

        assertClientThreadsShutdown(client1Thread);
        assertClientsStopped(ClientState.STOPPED, client1);
        assertFalse("Test should have no errors", results.hasErrors());
        List<ITestResult> allTestResults = results.getTestResults();
        assertEquals("Unexpected number of test results", 1, allTestResults.size());
        ITestResult testResult1 = allTestResults.get(0);
        assertEquals("Unexpected test name", "Test 1", testResult1.getName());
        List<ParticipantResult> test1ParticipantResults = testResult1.getParticipantResults();
        assertEquals("Unexpected number of participant results for test 1", 1, test1ParticipantResults.size());
View Full Code Here

        final Thread client1Thread = createBackgroundClientThread(client1);
        final Thread client2Thread = createBackgroundClientThread(client2);

        _controller.awaitClientRegistrations();

        ResultsForAllTests results = _controller.runAllTests();
        _controller.stopAllRegisteredClients();

        assertClientThreadsShutdown(client1Thread, client2Thread);
        assertClientsStopped(ClientState.STOPPED, client1, client2);

        assertFalse("Test should have no errors", results.hasErrors());

        List<TestResult> allTestResults = (List)results.getTestResults();
        assertEquals("Unexpected number of test results", expectedNumberOfTests, allTestResults.size());

        return allTestResults;
    }
View Full Code Here


    public void testWriteResults() throws Exception
    {
        Context context = getContext();
        ResultsForAllTests results = _resultsTestFixture.createResultsForAllTests();
        String runId = "myRunId";

        ResultsDbWriter resultsDbWriter = new ResultsDbWriter(context, runId, _clock);
        resultsDbWriter.createResultsTableIfNecessary();
View Full Code Here

                controller.setConfig(testConfig);

                controller.awaitClientRegistrations();

                LOGGER.info("Running test : " + testConfigFile);
                ResultsForAllTests testResult = runTest(controller, testConfigFile);
                results.add(testResult);
            }

            _resultsFileWriter.writeResultsSummary(results);
        }
View Full Code Here

    private ResultsForAllTests runTest(Controller controller, String testConfigFile)
    {
        final Config testConfig = buildTestConfigFrom(testConfigFile);
        controller.setConfig(testConfig);

        ResultsForAllTests rawResultsForAllTests = controller.runAllTests();
        ResultsForAllTests resultsForAllTests = _aggregator.aggregateResults(rawResultsForAllTests);

        _resultsFileWriter.writeResultsToFile(resultsForAllTests, testConfigFile);
        if(_resultsDbWriter != null)
        {
            _resultsDbWriter.writeResults(resultsForAllTests);
View Full Code Here

        _resultsFileWriter.setTestResultAggregator(_testResultAggregator);
    }

    public void testWriteResultsToFile()
    {
        ResultsForAllTests resultsForAllTests = mock(ResultsForAllTests.class);

        String expectedCsvContents = "expected-csv-contents";
        when(_csvFormater.format(resultsForAllTests)).thenReturn(expectedCsvContents);

        _resultsFileWriter.writeResultsToFile(resultsForAllTests, "config.json");
View Full Code Here

TOP

Related Classes of org.apache.qpid.disttest.controller.ResultsForAllTests

Copyright © 2018 www.massapicom. 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.