Exemple #1
0
 def testStartStopTest_Start2Tests(self):
     channel = SummaryChannel("summary")
     channel.start(self.suiteResult)
     channel.startTest(self.caseResult, self.deviceResult)
     channel.stopTest(self.caseResult, self.deviceResult)
     channel.startTest(self.caseResult1, self.deviceResult1)
     channel.startTest(self.caseResult2, self.deviceResult)
     channel.stop()
     summary = channel.getSummary()
     self.assertEqual(3, summary[COUNTER_N_TESTS])
     self.assertEqual(3, summary[COUNTER_TESTS_RUN])
     self.assertEqual(1, summary[STATUS_PASSED])
     self.assertEqual(0, summary[STATUS_FAILED])
     self.assertEqual(0, summary[STATUS_ERROR])
     self.assertEqual(2, summary[STATUS_NOT_COMPLETED])
     self.assertEqual(0, summary[COUNTER_CORE_DUMPS])
Exemple #2
0
 def testStartStopTest_CoreDumps(self):
     channel = SummaryChannel("summary")
     channel.start(self.caseResult)
     channel.startTest(self.caseResult, self.deviceResult)
     self.deviceResult.cores = ["core1", "core2", "core3"]
     channel.stopTest(self.caseResult, self.deviceResult)
     channel.stop()
     summary = channel.getSummary()
     self.assertEqual(1, summary[COUNTER_N_TESTS])
     self.assertEqual(1, summary[COUNTER_TESTS_RUN])
     self.assertEqual(1, summary[STATUS_PASSED])
     self.assertEqual(0, summary[STATUS_FAILED])
     self.assertEqual(0, summary[STATUS_ERROR])
     self.assertEqual(0, summary[STATUS_NOT_COMPLETED])
     self.assertEqual(len(self.deviceResult.cores),
                      summary[COUNTER_CORE_DUMPS])