Examples of ReportEntry


Examples of com.taobao.top.analysis.statistics.data.ReportEntry

      if (node == null || (node != null && node.size() == 0))
        continue;
      Iterator<String> iter = node.keySet().iterator();
      while (iter.hasNext()) {
        String entryId = iter.next();
        ReportEntry entry = entryConfig.get(entryId);
        if (entry == null || (entry != null && entry.isLazy()))
          continue;
        if (result.get(entryId) == null)
          result.put(entryId, new HashMap<String, Object>());
        Map<String, Object> content = node.get(entryId);
        Iterator<String> keyIter = content.keySet().iterator();
        while (keyIter.hasNext()) {
          String key = keyIter.next();
          Object value = content.get(key);
          if (key == null || value == null)
            continue;
                    try {
                        entry.getReduceClass().reducer(entry, key, value, result.get(entryId), reduceType);
                    } catch (Throwable e) {
              logger.error("reduce error entryName:" + entry.getName() + ", key:" + key + ",value:" + value + "," + entry.getReports().toString(), e);
          }
        }

      }
View Full Code Here

Examples of org.apache.maven.surefire.report.ReportEntry

        assertEquals( "surefire.testcase.JunitParamsTest", reportName );
    }

    public void testRegular()
    {
        ReportEntry reportEntry = new SimpleReportEntry( "fud", "testSum(surefire.testcase.NonJunitParamsTest)" );
        WrappedReportEntry wr = new WrappedReportEntry( reportEntry, null, 12, null, null );
        final String reportName = wr.getReportName();
        assertEquals( "testSum", reportName );
    }
View Full Code Here

Examples of org.apache.maven.surefire.report.ReportEntry

    public void testGetReportNameWithParams()
        throws Exception
    {
        String category = "[0] 1\u002C 2\u002C 3 (testSum)(surefire.testcase.JunitParamsTest)";
        ReportEntry reportEntry = new SimpleReportEntry( "fud", category );
        WrappedReportEntry wr = new WrappedReportEntry( reportEntry, null, 12, null, null );
        final String reportName = wr.getReportName();
        assertEquals( "[0] 1, 2, 3 (testSum)", reportName );
    }
View Full Code Here

Examples of org.apache.maven.surefire.report.ReportEntry

    public void testElapsed()
        throws Exception
    {
        String category = "[0] 1\u002C 2\u002C 3 (testSum)(surefire.testcase.JunitParamsTest)";
        ReportEntry reportEntry = new SimpleReportEntry( "fud", category );
        WrappedReportEntry wr = new WrappedReportEntry( reportEntry, null, 12, null, null );
        String elapsedTimeSummary = wr.getElapsedTimeSummary();
        assertEquals( "[0] 1, 2, 3 (testSum)(surefire.testcase.JunitParamsTest)  Time elapsed: 0.012 sec",
                      elapsedTimeSummary );
    }
View Full Code Here

Examples of org.apache.maven.surefire.report.ReportEntry

    {
        File data = File.createTempFile( "surefire-unit", "test" );
        RunEntryStatisticsMap existingEntries = RunEntryStatisticsMap.fromFile( data );
        RunEntryStatisticsMap newResults = new RunEntryStatisticsMap();

        ReportEntry reportEntry1 = new SimpleReportEntry( "abc", "method1", new Integer( 42 ) );
        ReportEntry reportEntry2 = new SimpleReportEntry( "abc", "willFail", new Integer( 17 ) );
        ReportEntry reportEntry3 = new SimpleReportEntry( "abc", "method3", new Integer( 100 ) );

        newResults.add( existingEntries.createNextGeneration( reportEntry1 ) );
        newResults.add( existingEntries.createNextGeneration( reportEntry2 ) );
        newResults.add( existingEntries.createNextGeneration( reportEntry3 ) );
View Full Code Here

Examples of org.apache.maven.surefire.report.ReportEntry

    extends TestCase
{
    public void testTestFailure()
        throws Exception
    {
        ReportEntry reportEntry = new SimpleReportEntry( "a", "b" );
        TestMethod testMethod = new TestMethod( reportEntry, new TestSet(
            Description.createTestDescription( TestMethodTest.class, "testeEthodTest" ) ) );
        testMethod.testFailure( reportEntry );
        final int elapsed = testMethod.getElapsed();
        assertTrue( elapsed >= 0 );
View Full Code Here

Examples of org.apache.maven.surefire.report.ReportEntry

        String testHeader = failure.getTestHeader();
        if ( isInsaneJunitNullString( testHeader ) )
        {
            testHeader = "Failure when constructing test";
        }
        ReportEntry report = SimpleReportEntry.withException( getClassName( failure.getDescription() ), testHeader,
                                                              createStackTraceWriter( failure ) );

        if ( failure.getException() instanceof AssertionError )
        {
            this.reporter.testFailed( report );
View Full Code Here

Examples of org.apache.maven.surefire.report.ReportEntry

            return;
        }

        try
        {
            ReportEntry report = createReportEntry( null );

            target.testSetStarting( report );

            if ( beforeClass != null )
            {
View Full Code Here

Examples of org.apache.maven.surefire.report.ReportEntry

        finishTestSuite( reporter, this );
    }

    public static void startTestSuite( RunListener reporter, Object suite )
    {
        ReportEntry report = new SimpleReportEntry( suite.getClass().getName(), getSuiteName( suite ) );

        try
        {
            reporter.testSetStarting( report );
        }
View Full Code Here

Examples of org.apache.maven.surefire.report.ReportEntry

    }

    public static void finishTestSuite( RunListener reporterManager, Object suite )
        throws ReporterException
    {
        ReportEntry report = new SimpleReportEntry( suite.getClass().getName(), getSuiteName( suite ) );

        reporterManager.testSetCompleted( report );
    }
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.