Module: DevCreek
- Defined in:
- lib/devcreek_testresult.rb,
lib/devcreek.rb,
lib/devcreek_core.rb,
lib/devcreek_logger.rb,
lib/devcreek_testsuite.rb,
lib/devcreek_transmitter.rb,
lib/devcreek_metriccollector.rb,
lib/devcreek_record_template.rb,
lib/time/conversions/timeconversions.rb
Overview
timeconversions.rb
Copyright Caleb Powell 2007
Licensed under the LGPL, see the file README.txt in the distribution
Defined Under Namespace
Modules: Log, TimeConversions, Transmitter Classes: Core, MetricCollector, RSpecAdapter, TestResult, TestSuite, TestUnitAdapter
Constant Summary collapse
- VERSION =
"0.5"
- TRANSMISSION_RECORD_TEMPLATE =
%{ <records> <record> <core.principal><%= DevCreek::Core.instance.principal %></core.principal> <core.project><%= DevCreek::Core.instance.project %></core.project> <core.sessionId><%= session_id %></core.sessionId> <core.timeStamp><%= start.localtime.to_millis %></core.timeStamp> <core.timeZoneOffset><%= start.localtime.gmt_offset * 1000 %></core.timeZoneOffset> <core.type>unittest.TestRunStarted</core.type> <unittest.testCount><%= run_count %></unittest.testCount> <unittest.testFramework><%= framework %></unittest.testFramework> <unittest.testLanguage>ruby</unittest.testLanguage> <unittest.testRunLauncher>manual</unittest.testRunLauncher> </record> <% test_results.values.each do |test_result| %> <record> <core.principal><%= DevCreek::Core.instance.principal %></core.principal> <core.project><%= DevCreek::Core.instance.project %></core.project> <core.sessionId><%= session_id %></core.sessionId> <core.timeStamp><%= test_result.start.localtime.to_millis %></core.timeStamp> <core.timeZoneOffset><%= test_result.start.localtime.gmt_offset * 1000 %></core.timeZoneOffset> <core.type>unittest.TestStarted</core.type> <unittest.testClass><%= test_result.test_class %></unittest.testClass> <unittest.testFramework><%= framework %></unittest.testFramework> <unittest.testLanguage>ruby</unittest.testLanguage> <unittest.testName><%= test_result.test_name %></unittest.testName> <unittest.testRunLauncher>manual</unittest.testRunLauncher> </record> <record> <core.principal><%= DevCreek::Core.instance.principal %></core.principal> <core.project><%= DevCreek::Core.instance.project %></core.project> <core.sessionId><%= session_id %></core.sessionId> <core.timeStamp><%= test_result.finish.localtime.to_millis %></core.timeStamp> <core.timeZoneOffset><%= test_result.finish.localtime.gmt_offset * 1000 %></core.timeZoneOffset> <core.type>unittest.TestEnded</core.type> <unittest.testClass><%= test_result.test_class %></unittest.testClass> <unittest.testFramework><%= framework %></unittest.testFramework> <unittest.testLanguage>ruby</unittest.testLanguage> <unittest.testName><%= test_result.test_name %></unittest.testName> <unittest.testRunLauncher>manual</unittest.testRunLauncher> <unittest.testStatus><%= test_result.status %></unittest.testStatus> </record> <% end %> <record> <core.elapsedTime><%= elapsed_time %></core.elapsedTime> <core.principal><%= DevCreek::Core.instance.principal %></core.principal> <core.project><%= DevCreek::Core.instance.project %></core.project> <core.sessionId><%= session_id %></core.sessionId> <core.timeStamp><%= finish.localtime.to_millis %></core.timeStamp> <core.timeZoneOffset><%= finish.localtime.gmt_offset * 1000 %></core.timeZoneOffset> <core.type>unittest.TestRunEnded</core.type> <unittest.errorTotal><%= error_count %></unittest.errorTotal> <unittest.failureTotal><%= failure_count %></unittest.failureTotal> <unittest.successTotal><%= success_count %></unittest.successTotal> <unittest.testFramework><%= framework %></unittest.testFramework> <unittest.testLanguage>ruby</unittest.testLanguage> <unittest.testRunLauncher>manual</unittest.testRunLauncher> <unittest.testRunStatus>ENDED</unittest.testRunStatus> </record> </records> }.gsub(/^ /, '').freeze