Googletest export
Update XML and JSON output to be consistent with the standard. PiperOrigin-RevId: 239833242
This commit is contained in:
parent
1f64659fb2
commit
5b752b1947
@ -20,7 +20,7 @@ instructions for how to sign and return it. Once we receive it, we'll be able to
|
|||||||
accept your pull requests.
|
accept your pull requests.
|
||||||
|
|
||||||
## Are you a Googler?
|
## Are you a Googler?
|
||||||
If you are a Googler, it is preferrable to create an internal change and send it for review.
|
If you are a Googler, you can either create an internal change or work on GitHub directly.
|
||||||
|
|
||||||
|
|
||||||
## Contributing A Patch
|
## Contributing A Patch
|
||||||
|
@ -2112,8 +2112,14 @@ static const char* const kReservedTestSuiteAttributes[] = {
|
|||||||
|
|
||||||
// The list of reserved attributes used in the <testcase> element of XML output.
|
// The list of reserved attributes used in the <testcase> element of XML output.
|
||||||
static const char* const kReservedTestCaseAttributes[] = {
|
static const char* const kReservedTestCaseAttributes[] = {
|
||||||
"classname", "name", "status", "time",
|
"classname", "name", "status", "time", "type_param",
|
||||||
"type_param", "value_param", "file", "line"};
|
"value_param", "file", "line"};
|
||||||
|
|
||||||
|
// Use a slightly different set for allowed output to ensure existing tests can
|
||||||
|
// still RecordProperty("result")
|
||||||
|
static const char* const kReservedOutputTestCaseAttributes[] = {
|
||||||
|
"classname", "name", "status", "time", "type_param",
|
||||||
|
"value_param", "file", "line", "result"};
|
||||||
|
|
||||||
template <int kSize>
|
template <int kSize>
|
||||||
std::vector<std::string> ArrayAsVector(const char* const (&array)[kSize]) {
|
std::vector<std::string> ArrayAsVector(const char* const (&array)[kSize]) {
|
||||||
@ -2135,6 +2141,22 @@ static std::vector<std::string> GetReservedAttributesForElement(
|
|||||||
return std::vector<std::string>();
|
return std::vector<std::string>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO(jdesprez): Merge the two getReserved attributes once skip is improved
|
||||||
|
static std::vector<std::string> GetReservedOutputAttributesForElement(
|
||||||
|
const std::string& xml_element) {
|
||||||
|
if (xml_element == "testsuites") {
|
||||||
|
return ArrayAsVector(kReservedTestSuitesAttributes);
|
||||||
|
} else if (xml_element == "testsuite") {
|
||||||
|
return ArrayAsVector(kReservedTestSuiteAttributes);
|
||||||
|
} else if (xml_element == "testcase") {
|
||||||
|
return ArrayAsVector(kReservedOutputTestCaseAttributes);
|
||||||
|
} else {
|
||||||
|
GTEST_CHECK_(false) << "Unrecognized xml_element provided: " << xml_element;
|
||||||
|
}
|
||||||
|
// This code is unreachable but some compilers may not realizes that.
|
||||||
|
return std::vector<std::string>();
|
||||||
|
}
|
||||||
|
|
||||||
static std::string FormatWordList(const std::vector<std::string>& words) {
|
static std::string FormatWordList(const std::vector<std::string>& words) {
|
||||||
Message word_list;
|
Message word_list;
|
||||||
for (size_t i = 0; i < words.size(); ++i) {
|
for (size_t i = 0; i < words.size(); ++i) {
|
||||||
@ -3717,7 +3739,7 @@ void XmlUnitTestResultPrinter::OutputXmlAttribute(
|
|||||||
const std::string& name,
|
const std::string& name,
|
||||||
const std::string& value) {
|
const std::string& value) {
|
||||||
const std::vector<std::string>& allowed_names =
|
const std::vector<std::string>& allowed_names =
|
||||||
GetReservedAttributesForElement(element_name);
|
GetReservedOutputAttributesForElement(element_name);
|
||||||
|
|
||||||
GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=
|
GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=
|
||||||
allowed_names.end())
|
allowed_names.end())
|
||||||
@ -3757,9 +3779,12 @@ void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
OutputXmlAttribute(
|
OutputXmlAttribute(stream, kTestsuite, "status",
|
||||||
stream, kTestsuite, "status",
|
test_info.should_run() ? "run" : "notrun");
|
||||||
result.Skipped() ? "skipped" : test_info.should_run() ? "run" : "notrun");
|
OutputXmlAttribute(stream, kTestsuite, "result",
|
||||||
|
test_info.should_run()
|
||||||
|
? (result.Skipped() ? "skipped" : "completed")
|
||||||
|
: "suppressed");
|
||||||
OutputXmlAttribute(stream, kTestsuite, "time",
|
OutputXmlAttribute(stream, kTestsuite, "time",
|
||||||
FormatTimeInMillisAsSeconds(result.elapsed_time()));
|
FormatTimeInMillisAsSeconds(result.elapsed_time()));
|
||||||
OutputXmlAttribute(stream, kTestsuite, "classname", test_suite_name);
|
OutputXmlAttribute(stream, kTestsuite, "classname", test_suite_name);
|
||||||
@ -4065,7 +4090,7 @@ void JsonUnitTestResultPrinter::OutputJsonKey(
|
|||||||
const std::string& indent,
|
const std::string& indent,
|
||||||
bool comma) {
|
bool comma) {
|
||||||
const std::vector<std::string>& allowed_names =
|
const std::vector<std::string>& allowed_names =
|
||||||
GetReservedAttributesForElement(element_name);
|
GetReservedOutputAttributesForElement(element_name);
|
||||||
|
|
||||||
GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=
|
GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=
|
||||||
allowed_names.end())
|
allowed_names.end())
|
||||||
@ -4085,7 +4110,7 @@ void JsonUnitTestResultPrinter::OutputJsonKey(
|
|||||||
const std::string& indent,
|
const std::string& indent,
|
||||||
bool comma) {
|
bool comma) {
|
||||||
const std::vector<std::string>& allowed_names =
|
const std::vector<std::string>& allowed_names =
|
||||||
GetReservedAttributesForElement(element_name);
|
GetReservedOutputAttributesForElement(element_name);
|
||||||
|
|
||||||
GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=
|
GTEST_CHECK_(std::find(allowed_names.begin(), allowed_names.end(), name) !=
|
||||||
allowed_names.end())
|
allowed_names.end())
|
||||||
@ -4123,10 +4148,13 @@ void JsonUnitTestResultPrinter::OutputJsonTestInfo(::std::ostream* stream,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
OutputJsonKey(
|
OutputJsonKey(stream, kTestsuite, "status",
|
||||||
stream, kTestsuite, "status",
|
test_info.should_run() ? "RUN" : "NOTRUN", kIndent);
|
||||||
result.Skipped() ? "SKIPPED" : test_info.should_run() ? "RUN" : "NOTRUN",
|
OutputJsonKey(stream, kTestsuite, "result",
|
||||||
kIndent);
|
test_info.should_run()
|
||||||
|
? (result.Skipped() ? "SKIPPED" : "COMPLETED")
|
||||||
|
: "SUPPRESSED",
|
||||||
|
kIndent);
|
||||||
OutputJsonKey(stream, kTestsuite, "time",
|
OutputJsonKey(stream, kTestsuite, "time",
|
||||||
FormatTimeInMillisAsDuration(result.elapsed_time()), kIndent);
|
FormatTimeInMillisAsDuration(result.elapsed_time()), kIndent);
|
||||||
OutputJsonKey(stream, kTestsuite, "classname", test_suite_name, kIndent,
|
OutputJsonKey(stream, kTestsuite, "classname", test_suite_name, kIndent,
|
||||||
|
@ -40,23 +40,37 @@ GTEST_OUTPUT_1_TEST = 'gtest_xml_outfile1_test_'
|
|||||||
GTEST_OUTPUT_2_TEST = 'gtest_xml_outfile2_test_'
|
GTEST_OUTPUT_2_TEST = 'gtest_xml_outfile2_test_'
|
||||||
|
|
||||||
EXPECTED_1 = {
|
EXPECTED_1 = {
|
||||||
u'tests': 1,
|
u'tests':
|
||||||
u'failures': 0,
|
1,
|
||||||
u'disabled': 0,
|
u'failures':
|
||||||
u'errors': 0,
|
0,
|
||||||
u'time': u'*',
|
u'disabled':
|
||||||
u'timestamp': u'*',
|
0,
|
||||||
u'name': u'AllTests',
|
u'errors':
|
||||||
|
0,
|
||||||
|
u'time':
|
||||||
|
u'*',
|
||||||
|
u'timestamp':
|
||||||
|
u'*',
|
||||||
|
u'name':
|
||||||
|
u'AllTests',
|
||||||
u'testsuites': [{
|
u'testsuites': [{
|
||||||
u'name': u'PropertyOne',
|
u'name':
|
||||||
u'tests': 1,
|
u'PropertyOne',
|
||||||
u'failures': 0,
|
u'tests':
|
||||||
u'disabled': 0,
|
1,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
0,
|
||||||
|
u'disabled':
|
||||||
|
0,
|
||||||
|
u'errors':
|
||||||
|
0,
|
||||||
|
u'time':
|
||||||
|
u'*',
|
||||||
u'testsuite': [{
|
u'testsuite': [{
|
||||||
u'name': u'TestSomeProperties',
|
u'name': u'TestSomeProperties',
|
||||||
u'status': u'RUN',
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
u'time': u'*',
|
u'time': u'*',
|
||||||
u'classname': u'PropertyOne',
|
u'classname': u'PropertyOne',
|
||||||
u'SetUpProp': u'1',
|
u'SetUpProp': u'1',
|
||||||
@ -67,23 +81,37 @@ EXPECTED_1 = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EXPECTED_2 = {
|
EXPECTED_2 = {
|
||||||
u'tests': 1,
|
u'tests':
|
||||||
u'failures': 0,
|
1,
|
||||||
u'disabled': 0,
|
u'failures':
|
||||||
u'errors': 0,
|
0,
|
||||||
u'time': u'*',
|
u'disabled':
|
||||||
u'timestamp': u'*',
|
0,
|
||||||
u'name': u'AllTests',
|
u'errors':
|
||||||
|
0,
|
||||||
|
u'time':
|
||||||
|
u'*',
|
||||||
|
u'timestamp':
|
||||||
|
u'*',
|
||||||
|
u'name':
|
||||||
|
u'AllTests',
|
||||||
u'testsuites': [{
|
u'testsuites': [{
|
||||||
u'name': u'PropertyTwo',
|
u'name':
|
||||||
u'tests': 1,
|
u'PropertyTwo',
|
||||||
u'failures': 0,
|
u'tests':
|
||||||
u'disabled': 0,
|
1,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
0,
|
||||||
|
u'disabled':
|
||||||
|
0,
|
||||||
|
u'errors':
|
||||||
|
0,
|
||||||
|
u'time':
|
||||||
|
u'*',
|
||||||
u'testsuite': [{
|
u'testsuite': [{
|
||||||
u'name': u'TestSomeProperties',
|
u'name': u'TestSomeProperties',
|
||||||
u'status': u'RUN',
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
u'time': u'*',
|
u'time': u'*',
|
||||||
u'classname': u'PropertyTwo',
|
u'classname': u'PropertyTwo',
|
||||||
u'SetUpProp': u'2',
|
u'SetUpProp': u'2',
|
||||||
|
@ -57,236 +57,308 @@ else:
|
|||||||
STACK_TRACE_TEMPLATE = ''
|
STACK_TRACE_TEMPLATE = ''
|
||||||
|
|
||||||
EXPECTED_NON_EMPTY = {
|
EXPECTED_NON_EMPTY = {
|
||||||
u'tests': 24,
|
u'tests':
|
||||||
u'failures': 4,
|
24,
|
||||||
u'disabled': 2,
|
u'failures':
|
||||||
u'errors': 0,
|
4,
|
||||||
u'timestamp': u'*',
|
u'disabled':
|
||||||
u'time': u'*',
|
2,
|
||||||
u'ad_hoc_property': u'42',
|
u'errors':
|
||||||
u'name': u'AllTests',
|
0,
|
||||||
|
u'timestamp':
|
||||||
|
u'*',
|
||||||
|
u'time':
|
||||||
|
u'*',
|
||||||
|
u'ad_hoc_property':
|
||||||
|
u'42',
|
||||||
|
u'name':
|
||||||
|
u'AllTests',
|
||||||
u'testsuites': [
|
u'testsuites': [
|
||||||
{
|
{
|
||||||
u'name': u'SuccessfulTest',
|
u'name':
|
||||||
u'tests': 1,
|
u'SuccessfulTest',
|
||||||
u'failures': 0,
|
u'tests':
|
||||||
u'disabled': 0,
|
1,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
0,
|
||||||
u'testsuite': [
|
u'disabled':
|
||||||
{
|
0,
|
||||||
u'name': u'Succeeds',
|
u'errors':
|
||||||
u'status': u'RUN',
|
0,
|
||||||
u'time': u'*',
|
u'time':
|
||||||
u'classname': u'SuccessfulTest'
|
u'*',
|
||||||
}
|
u'testsuite': [{
|
||||||
]
|
u'name': u'Succeeds',
|
||||||
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
|
u'time': u'*',
|
||||||
|
u'classname': u'SuccessfulTest'
|
||||||
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'FailedTest',
|
u'name':
|
||||||
u'tests': 1,
|
u'FailedTest',
|
||||||
u'failures': 1,
|
u'tests':
|
||||||
u'disabled': 0,
|
1,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
1,
|
||||||
u'testsuite': [
|
u'disabled':
|
||||||
{
|
0,
|
||||||
u'name': u'Fails',
|
u'errors':
|
||||||
u'status': u'RUN',
|
0,
|
||||||
u'time': u'*',
|
u'time':
|
||||||
u'classname': u'FailedTest',
|
u'*',
|
||||||
u'failures': [
|
u'testsuite': [{
|
||||||
{
|
u'name':
|
||||||
u'failure':
|
u'Fails',
|
||||||
u'gtest_xml_output_unittest_.cc:*\n'
|
u'status':
|
||||||
|
u'RUN',
|
||||||
|
u'result':
|
||||||
|
u'COMPLETED',
|
||||||
|
u'time':
|
||||||
|
u'*',
|
||||||
|
u'classname':
|
||||||
|
u'FailedTest',
|
||||||
|
u'failures': [{
|
||||||
|
u'failure': u'gtest_xml_output_unittest_.cc:*\n'
|
||||||
u'Expected equality of these values:\n'
|
u'Expected equality of these values:\n'
|
||||||
u' 1\n 2' + STACK_TRACE_TEMPLATE,
|
u' 1\n 2' + STACK_TRACE_TEMPLATE,
|
||||||
u'type': u''
|
u'type': u''
|
||||||
}
|
}]
|
||||||
]
|
}]
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'DisabledTest',
|
u'name':
|
||||||
u'tests': 1,
|
u'DisabledTest',
|
||||||
u'failures': 0,
|
u'tests':
|
||||||
u'disabled': 1,
|
1,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
0,
|
||||||
u'testsuite': [
|
u'disabled':
|
||||||
{
|
1,
|
||||||
u'name': u'DISABLED_test_not_run',
|
u'errors':
|
||||||
u'status': u'NOTRUN',
|
0,
|
||||||
u'time': u'*',
|
u'time':
|
||||||
u'classname': u'DisabledTest'
|
u'*',
|
||||||
}
|
u'testsuite': [{
|
||||||
]
|
u'name': u'DISABLED_test_not_run',
|
||||||
|
u'status': u'NOTRUN',
|
||||||
|
u'result': u'SUPPRESSED',
|
||||||
|
u'time': u'*',
|
||||||
|
u'classname': u'DisabledTest'
|
||||||
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'SkippedTest',
|
u'name':
|
||||||
u'tests': 1,
|
u'SkippedTest',
|
||||||
u'failures': 0,
|
u'tests':
|
||||||
u'disabled': 0,
|
1,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
0,
|
||||||
u'testsuite': [
|
u'disabled':
|
||||||
{
|
0,
|
||||||
u'name': u'Skipped',
|
u'errors':
|
||||||
u'status': u'SKIPPED',
|
0,
|
||||||
u'time': u'*',
|
u'time':
|
||||||
u'classname': u'SkippedTest'
|
u'*',
|
||||||
}
|
u'testsuite': [{
|
||||||
]
|
u'name': u'Skipped',
|
||||||
|
u'status': u'RUN',
|
||||||
|
u'result': u'SKIPPED',
|
||||||
|
u'time': u'*',
|
||||||
|
u'classname': u'SkippedTest'
|
||||||
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'MixedResultTest',
|
u'name':
|
||||||
u'tests': 3,
|
u'MixedResultTest',
|
||||||
u'failures': 1,
|
u'tests':
|
||||||
u'disabled': 1,
|
3,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
1,
|
||||||
|
u'disabled':
|
||||||
|
1,
|
||||||
|
u'errors':
|
||||||
|
0,
|
||||||
|
u'time':
|
||||||
|
u'*',
|
||||||
u'testsuite': [
|
u'testsuite': [
|
||||||
{
|
{
|
||||||
u'name': u'Succeeds',
|
u'name': u'Succeeds',
|
||||||
u'status': u'RUN',
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
u'time': u'*',
|
u'time': u'*',
|
||||||
u'classname': u'MixedResultTest'
|
u'classname': u'MixedResultTest'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'Fails',
|
u'name':
|
||||||
u'status': u'RUN',
|
u'Fails',
|
||||||
u'time': u'*',
|
u'status':
|
||||||
u'classname': u'MixedResultTest',
|
u'RUN',
|
||||||
u'failures': [
|
u'result':
|
||||||
{
|
u'COMPLETED',
|
||||||
u'failure':
|
u'time':
|
||||||
u'gtest_xml_output_unittest_.cc:*\n'
|
u'*',
|
||||||
u'Expected equality of these values:\n'
|
u'classname':
|
||||||
u' 1\n 2' + STACK_TRACE_TEMPLATE,
|
u'MixedResultTest',
|
||||||
|
u'failures':
|
||||||
|
[{
|
||||||
|
u'failure': u'gtest_xml_output_unittest_.cc:*\n'
|
||||||
|
u'Expected equality of these values:\n'
|
||||||
|
u' 1\n 2' + STACK_TRACE_TEMPLATE,
|
||||||
u'type': u''
|
u'type': u''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'failure':
|
u'failure': u'gtest_xml_output_unittest_.cc:*\n'
|
||||||
u'gtest_xml_output_unittest_.cc:*\n'
|
u'Expected equality of these values:\n'
|
||||||
u'Expected equality of these values:\n'
|
u' 2\n 3' + STACK_TRACE_TEMPLATE,
|
||||||
u' 2\n 3' + STACK_TRACE_TEMPLATE,
|
u'type': u''
|
||||||
u'type': u''
|
}]
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'DISABLED_test',
|
u'name': u'DISABLED_test',
|
||||||
u'status': u'NOTRUN',
|
u'status': u'NOTRUN',
|
||||||
|
u'result': u'SUPPRESSED',
|
||||||
u'time': u'*',
|
u'time': u'*',
|
||||||
u'classname': u'MixedResultTest'
|
u'classname': u'MixedResultTest'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'XmlQuotingTest',
|
u'name':
|
||||||
u'tests': 1,
|
u'XmlQuotingTest',
|
||||||
u'failures': 1,
|
u'tests':
|
||||||
u'disabled': 0,
|
1,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
1,
|
||||||
u'testsuite': [
|
u'disabled':
|
||||||
{
|
0,
|
||||||
u'name': u'OutputsCData',
|
u'errors':
|
||||||
u'status': u'RUN',
|
0,
|
||||||
u'time': u'*',
|
u'time':
|
||||||
u'classname': u'XmlQuotingTest',
|
u'*',
|
||||||
u'failures': [
|
u'testsuite': [{
|
||||||
{
|
u'name':
|
||||||
u'failure':
|
u'OutputsCData',
|
||||||
u'gtest_xml_output_unittest_.cc:*\n'
|
u'status':
|
||||||
|
u'RUN',
|
||||||
|
u'result':
|
||||||
|
u'COMPLETED',
|
||||||
|
u'time':
|
||||||
|
u'*',
|
||||||
|
u'classname':
|
||||||
|
u'XmlQuotingTest',
|
||||||
|
u'failures': [{
|
||||||
|
u'failure': u'gtest_xml_output_unittest_.cc:*\n'
|
||||||
u'Failed\nXML output: <?xml encoding="utf-8">'
|
u'Failed\nXML output: <?xml encoding="utf-8">'
|
||||||
u'<top><![CDATA[cdata text]]></top>' +
|
u'<top><![CDATA[cdata text]]></top>' +
|
||||||
STACK_TRACE_TEMPLATE,
|
STACK_TRACE_TEMPLATE,
|
||||||
u'type': u''
|
u'type': u''
|
||||||
}
|
}]
|
||||||
]
|
}]
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'InvalidCharactersTest',
|
u'name':
|
||||||
u'tests': 1,
|
u'InvalidCharactersTest',
|
||||||
u'failures': 1,
|
u'tests':
|
||||||
u'disabled': 0,
|
1,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
1,
|
||||||
u'testsuite': [
|
u'disabled':
|
||||||
{
|
0,
|
||||||
u'name': u'InvalidCharactersInMessage',
|
u'errors':
|
||||||
u'status': u'RUN',
|
0,
|
||||||
u'time': u'*',
|
u'time':
|
||||||
u'classname': u'InvalidCharactersTest',
|
u'*',
|
||||||
u'failures': [
|
u'testsuite': [{
|
||||||
{
|
u'name':
|
||||||
u'failure':
|
u'InvalidCharactersInMessage',
|
||||||
u'gtest_xml_output_unittest_.cc:*\n'
|
u'status':
|
||||||
|
u'RUN',
|
||||||
|
u'result':
|
||||||
|
u'COMPLETED',
|
||||||
|
u'time':
|
||||||
|
u'*',
|
||||||
|
u'classname':
|
||||||
|
u'InvalidCharactersTest',
|
||||||
|
u'failures': [{
|
||||||
|
u'failure': u'gtest_xml_output_unittest_.cc:*\n'
|
||||||
u'Failed\nInvalid characters in brackets'
|
u'Failed\nInvalid characters in brackets'
|
||||||
u' [\x01\x02]' + STACK_TRACE_TEMPLATE,
|
u' [\x01\x02]' + STACK_TRACE_TEMPLATE,
|
||||||
u'type': u''
|
u'type': u''
|
||||||
}
|
}]
|
||||||
]
|
}]
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'PropertyRecordingTest',
|
u'name':
|
||||||
u'tests': 4,
|
u'PropertyRecordingTest',
|
||||||
u'failures': 0,
|
u'tests':
|
||||||
u'disabled': 0,
|
4,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
0,
|
||||||
u'SetUpTestSuite': u'yes',
|
u'disabled':
|
||||||
u'TearDownTestSuite': u'aye',
|
0,
|
||||||
u'testsuite': [
|
u'errors':
|
||||||
{
|
0,
|
||||||
u'name': u'OneProperty',
|
u'time':
|
||||||
u'status': u'RUN',
|
u'*',
|
||||||
u'time': u'*',
|
u'SetUpTestSuite':
|
||||||
u'classname': u'PropertyRecordingTest',
|
u'yes',
|
||||||
u'key_1': u'1'
|
u'TearDownTestSuite':
|
||||||
},
|
u'aye',
|
||||||
{
|
u'testsuite': [{
|
||||||
u'name': u'IntValuedProperty',
|
u'name': u'OneProperty',
|
||||||
u'status': u'RUN',
|
u'status': u'RUN',
|
||||||
u'time': u'*',
|
u'result': u'COMPLETED',
|
||||||
u'classname': u'PropertyRecordingTest',
|
u'time': u'*',
|
||||||
u'key_int': u'1'
|
u'classname': u'PropertyRecordingTest',
|
||||||
},
|
u'key_1': u'1'
|
||||||
{
|
},
|
||||||
u'name': u'ThreeProperties',
|
{
|
||||||
u'status': u'RUN',
|
u'name': u'IntValuedProperty',
|
||||||
u'time': u'*',
|
u'status': u'RUN',
|
||||||
u'classname': u'PropertyRecordingTest',
|
u'result': u'COMPLETED',
|
||||||
u'key_1': u'1',
|
u'time': u'*',
|
||||||
u'key_2': u'2',
|
u'classname': u'PropertyRecordingTest',
|
||||||
u'key_3': u'3'
|
u'key_int': u'1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'TwoValuesForOneKeyUsesLastValue',
|
u'name': u'ThreeProperties',
|
||||||
u'status': u'RUN',
|
u'status': u'RUN',
|
||||||
u'time': u'*',
|
u'result': u'COMPLETED',
|
||||||
u'classname': u'PropertyRecordingTest',
|
u'time': u'*',
|
||||||
u'key_1': u'2'
|
u'classname': u'PropertyRecordingTest',
|
||||||
}
|
u'key_1': u'1',
|
||||||
]
|
u'key_2': u'2',
|
||||||
|
u'key_3': u'3'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
u'name': u'TwoValuesForOneKeyUsesLastValue',
|
||||||
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
|
u'time': u'*',
|
||||||
|
u'classname': u'PropertyRecordingTest',
|
||||||
|
u'key_1': u'2'
|
||||||
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'NoFixtureTest',
|
u'name':
|
||||||
u'tests': 3,
|
u'NoFixtureTest',
|
||||||
u'failures': 0,
|
u'tests':
|
||||||
u'disabled': 0,
|
3,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
0,
|
||||||
|
u'disabled':
|
||||||
|
0,
|
||||||
|
u'errors':
|
||||||
|
0,
|
||||||
|
u'time':
|
||||||
|
u'*',
|
||||||
u'testsuite': [
|
u'testsuite': [
|
||||||
{
|
{
|
||||||
u'name': u'RecordProperty',
|
u'name': u'RecordProperty',
|
||||||
u'status': u'RUN',
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
u'time': u'*',
|
u'time': u'*',
|
||||||
u'classname': u'NoFixtureTest',
|
u'classname': u'NoFixtureTest',
|
||||||
u'key': u'1'
|
u'key': u'1'
|
||||||
@ -294,6 +366,7 @@ EXPECTED_NON_EMPTY = {
|
|||||||
{
|
{
|
||||||
u'name': u'ExternalUtilityThatCallsRecordIntValuedProperty',
|
u'name': u'ExternalUtilityThatCallsRecordIntValuedProperty',
|
||||||
u'status': u'RUN',
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
u'time': u'*',
|
u'time': u'*',
|
||||||
u'classname': u'NoFixtureTest',
|
u'classname': u'NoFixtureTest',
|
||||||
u'key_for_utility_int': u'1'
|
u'key_for_utility_int': u'1'
|
||||||
@ -301,93 +374,126 @@ EXPECTED_NON_EMPTY = {
|
|||||||
{
|
{
|
||||||
u'name':
|
u'name':
|
||||||
u'ExternalUtilityThatCallsRecordStringValuedProperty',
|
u'ExternalUtilityThatCallsRecordStringValuedProperty',
|
||||||
u'status': u'RUN',
|
u'status':
|
||||||
u'time': u'*',
|
u'RUN',
|
||||||
u'classname': u'NoFixtureTest',
|
u'result':
|
||||||
u'key_for_utility_string': u'1'
|
u'COMPLETED',
|
||||||
|
u'time':
|
||||||
|
u'*',
|
||||||
|
u'classname':
|
||||||
|
u'NoFixtureTest',
|
||||||
|
u'key_for_utility_string':
|
||||||
|
u'1'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'TypedTest/0',
|
u'name':
|
||||||
u'tests': 1,
|
u'TypedTest/0',
|
||||||
u'failures': 0,
|
u'tests':
|
||||||
u'disabled': 0,
|
1,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
0,
|
||||||
u'testsuite': [
|
u'disabled':
|
||||||
{
|
0,
|
||||||
u'name': u'HasTypeParamAttribute',
|
u'errors':
|
||||||
u'type_param': u'int',
|
0,
|
||||||
u'status': u'RUN',
|
u'time':
|
||||||
u'time': u'*',
|
u'*',
|
||||||
u'classname': u'TypedTest/0'
|
u'testsuite': [{
|
||||||
}
|
u'name': u'HasTypeParamAttribute',
|
||||||
]
|
u'type_param': u'int',
|
||||||
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
|
u'time': u'*',
|
||||||
|
u'classname': u'TypedTest/0'
|
||||||
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'TypedTest/1',
|
u'name':
|
||||||
u'tests': 1,
|
u'TypedTest/1',
|
||||||
u'failures': 0,
|
u'tests':
|
||||||
u'disabled': 0,
|
1,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
0,
|
||||||
u'testsuite': [
|
u'disabled':
|
||||||
{
|
0,
|
||||||
u'name': u'HasTypeParamAttribute',
|
u'errors':
|
||||||
u'type_param': u'long',
|
0,
|
||||||
u'status': u'RUN',
|
u'time':
|
||||||
u'time': u'*',
|
u'*',
|
||||||
u'classname': u'TypedTest/1'
|
u'testsuite': [{
|
||||||
}
|
u'name': u'HasTypeParamAttribute',
|
||||||
]
|
u'type_param': u'long',
|
||||||
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
|
u'time': u'*',
|
||||||
|
u'classname': u'TypedTest/1'
|
||||||
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'Single/TypeParameterizedTestSuite/0',
|
u'name':
|
||||||
u'tests': 1,
|
u'Single/TypeParameterizedTestSuite/0',
|
||||||
u'failures': 0,
|
u'tests':
|
||||||
u'disabled': 0,
|
1,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
0,
|
||||||
u'testsuite': [
|
u'disabled':
|
||||||
{
|
0,
|
||||||
u'name': u'HasTypeParamAttribute',
|
u'errors':
|
||||||
u'type_param': u'int',
|
0,
|
||||||
u'status': u'RUN',
|
u'time':
|
||||||
u'time': u'*',
|
u'*',
|
||||||
u'classname': u'Single/TypeParameterizedTestSuite/0'
|
u'testsuite': [{
|
||||||
}
|
u'name': u'HasTypeParamAttribute',
|
||||||
]
|
u'type_param': u'int',
|
||||||
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
|
u'time': u'*',
|
||||||
|
u'classname': u'Single/TypeParameterizedTestSuite/0'
|
||||||
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'Single/TypeParameterizedTestSuite/1',
|
u'name':
|
||||||
u'tests': 1,
|
u'Single/TypeParameterizedTestSuite/1',
|
||||||
u'failures': 0,
|
u'tests':
|
||||||
u'disabled': 0,
|
1,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
0,
|
||||||
u'testsuite': [
|
u'disabled':
|
||||||
{
|
0,
|
||||||
u'name': u'HasTypeParamAttribute',
|
u'errors':
|
||||||
u'type_param': u'long',
|
0,
|
||||||
u'status': u'RUN',
|
u'time':
|
||||||
u'time': u'*',
|
u'*',
|
||||||
u'classname': u'Single/TypeParameterizedTestSuite/1'
|
u'testsuite': [{
|
||||||
}
|
u'name': u'HasTypeParamAttribute',
|
||||||
]
|
u'type_param': u'long',
|
||||||
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
|
u'time': u'*',
|
||||||
|
u'classname': u'Single/TypeParameterizedTestSuite/1'
|
||||||
|
}]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
u'name': u'Single/ValueParamTest',
|
u'name':
|
||||||
u'tests': 4,
|
u'Single/ValueParamTest',
|
||||||
u'failures': 0,
|
u'tests':
|
||||||
u'disabled': 0,
|
4,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
0,
|
||||||
|
u'disabled':
|
||||||
|
0,
|
||||||
|
u'errors':
|
||||||
|
0,
|
||||||
|
u'time':
|
||||||
|
u'*',
|
||||||
u'testsuite': [
|
u'testsuite': [
|
||||||
{
|
{
|
||||||
u'name': u'HasValueParamAttribute/0',
|
u'name': u'HasValueParamAttribute/0',
|
||||||
u'value_param': u'33',
|
u'value_param': u'33',
|
||||||
u'status': u'RUN',
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
u'time': u'*',
|
u'time': u'*',
|
||||||
u'classname': u'Single/ValueParamTest'
|
u'classname': u'Single/ValueParamTest'
|
||||||
},
|
},
|
||||||
@ -395,6 +501,7 @@ EXPECTED_NON_EMPTY = {
|
|||||||
u'name': u'HasValueParamAttribute/1',
|
u'name': u'HasValueParamAttribute/1',
|
||||||
u'value_param': u'42',
|
u'value_param': u'42',
|
||||||
u'status': u'RUN',
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
u'time': u'*',
|
u'time': u'*',
|
||||||
u'classname': u'Single/ValueParamTest'
|
u'classname': u'Single/ValueParamTest'
|
||||||
},
|
},
|
||||||
@ -402,6 +509,7 @@ EXPECTED_NON_EMPTY = {
|
|||||||
u'name': u'AnotherTestThatHasValueParamAttribute/0',
|
u'name': u'AnotherTestThatHasValueParamAttribute/0',
|
||||||
u'value_param': u'33',
|
u'value_param': u'33',
|
||||||
u'status': u'RUN',
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
u'time': u'*',
|
u'time': u'*',
|
||||||
u'classname': u'Single/ValueParamTest'
|
u'classname': u'Single/ValueParamTest'
|
||||||
},
|
},
|
||||||
@ -409,6 +517,7 @@ EXPECTED_NON_EMPTY = {
|
|||||||
u'name': u'AnotherTestThatHasValueParamAttribute/1',
|
u'name': u'AnotherTestThatHasValueParamAttribute/1',
|
||||||
u'value_param': u'42',
|
u'value_param': u'42',
|
||||||
u'status': u'RUN',
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
u'time': u'*',
|
u'time': u'*',
|
||||||
u'classname': u'Single/ValueParamTest'
|
u'classname': u'Single/ValueParamTest'
|
||||||
}
|
}
|
||||||
@ -418,24 +527,39 @@ EXPECTED_NON_EMPTY = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EXPECTED_FILTERED = {
|
EXPECTED_FILTERED = {
|
||||||
u'tests': 1,
|
u'tests':
|
||||||
u'failures': 0,
|
1,
|
||||||
u'disabled': 0,
|
u'failures':
|
||||||
u'errors': 0,
|
0,
|
||||||
u'time': u'*',
|
u'disabled':
|
||||||
u'timestamp': u'*',
|
0,
|
||||||
u'name': u'AllTests',
|
u'errors':
|
||||||
u'ad_hoc_property': u'42',
|
0,
|
||||||
|
u'time':
|
||||||
|
u'*',
|
||||||
|
u'timestamp':
|
||||||
|
u'*',
|
||||||
|
u'name':
|
||||||
|
u'AllTests',
|
||||||
|
u'ad_hoc_property':
|
||||||
|
u'42',
|
||||||
u'testsuites': [{
|
u'testsuites': [{
|
||||||
u'name': u'SuccessfulTest',
|
u'name':
|
||||||
u'tests': 1,
|
u'SuccessfulTest',
|
||||||
u'failures': 0,
|
u'tests':
|
||||||
u'disabled': 0,
|
1,
|
||||||
u'errors': 0,
|
u'failures':
|
||||||
u'time': u'*',
|
0,
|
||||||
|
u'disabled':
|
||||||
|
0,
|
||||||
|
u'errors':
|
||||||
|
0,
|
||||||
|
u'time':
|
||||||
|
u'*',
|
||||||
u'testsuite': [{
|
u'testsuite': [{
|
||||||
u'name': u'Succeeds',
|
u'name': u'Succeeds',
|
||||||
u'status': u'RUN',
|
u'status': u'RUN',
|
||||||
|
u'result': u'COMPLETED',
|
||||||
u'time': u'*',
|
u'time': u'*',
|
||||||
u'classname': u'SuccessfulTest',
|
u'classname': u'SuccessfulTest',
|
||||||
}]
|
}]
|
||||||
|
@ -43,7 +43,7 @@ GTEST_OUTPUT_2_TEST = "gtest_xml_outfile2_test_"
|
|||||||
EXPECTED_XML_1 = """<?xml version="1.0" encoding="UTF-8"?>
|
EXPECTED_XML_1 = """<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<testsuites tests="1" failures="0" disabled="0" errors="0" time="*" timestamp="*" name="AllTests">
|
<testsuites tests="1" failures="0" disabled="0" errors="0" time="*" timestamp="*" name="AllTests">
|
||||||
<testsuite name="PropertyOne" tests="1" failures="0" disabled="0" errors="0" time="*">
|
<testsuite name="PropertyOne" tests="1" failures="0" disabled="0" errors="0" time="*">
|
||||||
<testcase name="TestSomeProperties" status="run" time="*" classname="PropertyOne">
|
<testcase name="TestSomeProperties" status="run" result="completed" time="*" classname="PropertyOne">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="SetUpProp" value="1"/>
|
<property name="SetUpProp" value="1"/>
|
||||||
<property name="TestSomeProperty" value="1"/>
|
<property name="TestSomeProperty" value="1"/>
|
||||||
@ -57,7 +57,7 @@ EXPECTED_XML_1 = """<?xml version="1.0" encoding="UTF-8"?>
|
|||||||
EXPECTED_XML_2 = """<?xml version="1.0" encoding="UTF-8"?>
|
EXPECTED_XML_2 = """<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<testsuites tests="1" failures="0" disabled="0" errors="0" time="*" timestamp="*" name="AllTests">
|
<testsuites tests="1" failures="0" disabled="0" errors="0" time="*" timestamp="*" name="AllTests">
|
||||||
<testsuite name="PropertyTwo" tests="1" failures="0" disabled="0" errors="0" time="*">
|
<testsuite name="PropertyTwo" tests="1" failures="0" disabled="0" errors="0" time="*">
|
||||||
<testcase name="TestSomeProperties" status="run" time="*" classname="PropertyTwo">
|
<testcase name="TestSomeProperties" status="run" result="completed" time="*" classname="PropertyTwo">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="SetUpProp" value="2"/>
|
<property name="SetUpProp" value="2"/>
|
||||||
<property name="TestSomeProperty" value="2"/>
|
<property name="TestSomeProperty" value="2"/>
|
||||||
|
@ -67,10 +67,10 @@ else:
|
|||||||
EXPECTED_NON_EMPTY_XML = """<?xml version="1.0" encoding="UTF-8"?>
|
EXPECTED_NON_EMPTY_XML = """<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<testsuites tests="24" failures="4" disabled="2" errors="0" time="*" timestamp="*" name="AllTests" ad_hoc_property="42">
|
<testsuites tests="24" failures="4" disabled="2" errors="0" time="*" timestamp="*" name="AllTests" ad_hoc_property="42">
|
||||||
<testsuite name="SuccessfulTest" tests="1" failures="0" disabled="0" errors="0" time="*">
|
<testsuite name="SuccessfulTest" tests="1" failures="0" disabled="0" errors="0" time="*">
|
||||||
<testcase name="Succeeds" status="run" time="*" classname="SuccessfulTest"/>
|
<testcase name="Succeeds" status="run" result="completed" time="*" classname="SuccessfulTest"/>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="FailedTest" tests="1" failures="1" disabled="0" errors="0" time="*">
|
<testsuite name="FailedTest" tests="1" failures="1" disabled="0" errors="0" time="*">
|
||||||
<testcase name="Fails" status="run" time="*" classname="FailedTest">
|
<testcase name="Fails" status="run" result="completed" time="*" classname="FailedTest">
|
||||||
<failure message="gtest_xml_output_unittest_.cc:*
Expected equality of these values:
 1
 2" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
|
<failure message="gtest_xml_output_unittest_.cc:*
Expected equality of these values:
 1
 2" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
|
||||||
Expected equality of these values:
|
Expected equality of these values:
|
||||||
1
|
1
|
||||||
@ -78,8 +78,8 @@ Expected equality of these values:
|
|||||||
</testcase>
|
</testcase>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="MixedResultTest" tests="3" failures="1" disabled="1" errors="0" time="*">
|
<testsuite name="MixedResultTest" tests="3" failures="1" disabled="1" errors="0" time="*">
|
||||||
<testcase name="Succeeds" status="run" time="*" classname="MixedResultTest"/>
|
<testcase name="Succeeds" status="run" result="completed" time="*" classname="MixedResultTest"/>
|
||||||
<testcase name="Fails" status="run" time="*" classname="MixedResultTest">
|
<testcase name="Fails" status="run" result="completed" time="*" classname="MixedResultTest">
|
||||||
<failure message="gtest_xml_output_unittest_.cc:*
Expected equality of these values:
 1
 2" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
|
<failure message="gtest_xml_output_unittest_.cc:*
Expected equality of these values:
 1
 2" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
|
||||||
Expected equality of these values:
|
Expected equality of these values:
|
||||||
1
|
1
|
||||||
@ -89,112 +89,114 @@ Expected equality of these values:
|
|||||||
2
|
2
|
||||||
3%(stack)s]]></failure>
|
3%(stack)s]]></failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase name="DISABLED_test" status="notrun" time="*" classname="MixedResultTest"/>
|
<testcase name="DISABLED_test" status="notrun" result="suppressed" time="*" classname="MixedResultTest"/>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="XmlQuotingTest" tests="1" failures="1" disabled="0" errors="0" time="*">
|
<testsuite name="XmlQuotingTest" tests="1" failures="1" disabled="0" errors="0" time="*">
|
||||||
<testcase name="OutputsCData" status="run" time="*" classname="XmlQuotingTest">
|
<testcase name="OutputsCData" status="run" result="completed" time="*" classname="XmlQuotingTest">
|
||||||
<failure message="gtest_xml_output_unittest_.cc:*
Failed
XML output: <?xml encoding="utf-8"><top><![CDATA[cdata text]]></top>" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
|
<failure message="gtest_xml_output_unittest_.cc:*
Failed
XML output: <?xml encoding="utf-8"><top><![CDATA[cdata text]]></top>" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
|
||||||
Failed
|
Failed
|
||||||
XML output: <?xml encoding="utf-8"><top><![CDATA[cdata text]]>]]><![CDATA[</top>%(stack)s]]></failure>
|
XML output: <?xml encoding="utf-8"><top><![CDATA[cdata text]]>]]><![CDATA[</top>%(stack)s]]></failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="InvalidCharactersTest" tests="1" failures="1" disabled="0" errors="0" time="*">
|
<testsuite name="InvalidCharactersTest" tests="1" failures="1" disabled="0" errors="0" time="*">
|
||||||
<testcase name="InvalidCharactersInMessage" status="run" time="*" classname="InvalidCharactersTest">
|
<testcase name="InvalidCharactersInMessage" status="run" result="completed" time="*" classname="InvalidCharactersTest">
|
||||||
<failure message="gtest_xml_output_unittest_.cc:*
Failed
Invalid characters in brackets []" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
|
<failure message="gtest_xml_output_unittest_.cc:*
Failed
Invalid characters in brackets []" type=""><![CDATA[gtest_xml_output_unittest_.cc:*
|
||||||
Failed
|
Failed
|
||||||
Invalid characters in brackets []%(stack)s]]></failure>
|
Invalid characters in brackets []%(stack)s]]></failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="DisabledTest" tests="1" failures="0" disabled="1" errors="0" time="*">
|
<testsuite name="DisabledTest" tests="1" failures="0" disabled="1" errors="0" time="*">
|
||||||
<testcase name="DISABLED_test_not_run" status="notrun" time="*" classname="DisabledTest"/>
|
<testcase name="DISABLED_test_not_run" status="notrun" result="suppressed" time="*" classname="DisabledTest"/>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="SkippedTest" tests="1" failures="0" disabled="0" errors="0" time="*">
|
<testsuite name="SkippedTest" tests="1" failures="0" disabled="0" errors="0" time="*">
|
||||||
<testcase name="Skipped" status="skipped" time="*" classname="SkippedTest"/>
|
<testcase name="Skipped" status="run" result="skipped" time="*" classname="SkippedTest"/>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="PropertyRecordingTest" tests="4" failures="0" disabled="0" errors="0" time="*" SetUpTestSuite="yes" TearDownTestSuite="aye">
|
<testsuite name="PropertyRecordingTest" tests="4" failures="0" disabled="0" errors="0" time="*" SetUpTestSuite="yes" TearDownTestSuite="aye">
|
||||||
<testcase name="OneProperty" status="run" time="*" classname="PropertyRecordingTest">
|
<testcase name="OneProperty" status="run" result="completed" time="*" classname="PropertyRecordingTest">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="key_1" value="1"/>
|
<property name="key_1" value="1"/>
|
||||||
</properties>
|
</properties>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase name="IntValuedProperty" status="run" time="*" classname="PropertyRecordingTest">
|
<testcase name="IntValuedProperty" status="run" result="completed" time="*" classname="PropertyRecordingTest">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="key_int" value="1"/>
|
<property name="key_int" value="1"/>
|
||||||
</properties>
|
</properties>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase name="ThreeProperties" status="run" time="*" classname="PropertyRecordingTest">
|
<testcase name="ThreeProperties" status="run" result="completed" time="*" classname="PropertyRecordingTest">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="key_1" value="1"/>
|
<property name="key_1" value="1"/>
|
||||||
<property name="key_2" value="2"/>
|
<property name="key_2" value="2"/>
|
||||||
<property name="key_3" value="3"/>
|
<property name="key_3" value="3"/>
|
||||||
</properties>
|
</properties>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase name="TwoValuesForOneKeyUsesLastValue" status="run" time="*" classname="PropertyRecordingTest">
|
<testcase name="TwoValuesForOneKeyUsesLastValue" status="run" result="completed" time="*" classname="PropertyRecordingTest">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="key_1" value="2"/>
|
<property name="key_1" value="2"/>
|
||||||
</properties>
|
</properties>
|
||||||
</testcase>
|
</testcase>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="NoFixtureTest" tests="3" failures="0" disabled="0" errors="0" time="*">
|
<testsuite name="NoFixtureTest" tests="3" failures="0" disabled="0" errors="0" time="*">
|
||||||
<testcase name="RecordProperty" status="run" time="*" classname="NoFixtureTest">
|
<testcase name="RecordProperty" status="run" result="completed" time="*" classname="NoFixtureTest">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="key" value="1"/>
|
<property name="key" value="1"/>
|
||||||
</properties>
|
</properties>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase name="ExternalUtilityThatCallsRecordIntValuedProperty" status="run" time="*" classname="NoFixtureTest">
|
<testcase name="ExternalUtilityThatCallsRecordIntValuedProperty" status="run" result="completed" time="*" classname="NoFixtureTest">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="key_for_utility_int" value="1"/>
|
<property name="key_for_utility_int" value="1"/>
|
||||||
</properties>
|
</properties>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase name="ExternalUtilityThatCallsRecordStringValuedProperty" status="run" time="*" classname="NoFixtureTest">
|
<testcase name="ExternalUtilityThatCallsRecordStringValuedProperty" status="run" result="completed" time="*" classname="NoFixtureTest">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="key_for_utility_string" value="1"/>
|
<property name="key_for_utility_string" value="1"/>
|
||||||
</properties>
|
</properties>
|
||||||
</testcase>
|
</testcase>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="Single/ValueParamTest" tests="4" failures="0" disabled="0" errors="0" time="*">
|
<testsuite name="Single/ValueParamTest" tests="4" failures="0" disabled="0" errors="0" time="*">
|
||||||
<testcase name="HasValueParamAttribute/0" value_param="33" status="run" time="*" classname="Single/ValueParamTest" />
|
<testcase name="HasValueParamAttribute/0" value_param="33" status="run" result="completed" time="*" classname="Single/ValueParamTest" />
|
||||||
<testcase name="HasValueParamAttribute/1" value_param="42" status="run" time="*" classname="Single/ValueParamTest" />
|
<testcase name="HasValueParamAttribute/1" value_param="42" status="run" result="completed" time="*" classname="Single/ValueParamTest" />
|
||||||
<testcase name="AnotherTestThatHasValueParamAttribute/0" value_param="33" status="run" time="*" classname="Single/ValueParamTest" />
|
<testcase name="AnotherTestThatHasValueParamAttribute/0" value_param="33" status="run" result="completed" time="*" classname="Single/ValueParamTest" />
|
||||||
<testcase name="AnotherTestThatHasValueParamAttribute/1" value_param="42" status="run" time="*" classname="Single/ValueParamTest" />
|
<testcase name="AnotherTestThatHasValueParamAttribute/1" value_param="42" status="run" result="completed" time="*" classname="Single/ValueParamTest" />
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="TypedTest/0" tests="1" failures="0" disabled="0" errors="0" time="*">
|
<testsuite name="TypedTest/0" tests="1" failures="0" disabled="0" errors="0" time="*">
|
||||||
<testcase name="HasTypeParamAttribute" type_param="*" status="run" time="*" classname="TypedTest/0" />
|
<testcase name="HasTypeParamAttribute" type_param="*" status="run" result="completed" time="*" classname="TypedTest/0" />
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="TypedTest/1" tests="1" failures="0" disabled="0" errors="0" time="*">
|
<testsuite name="TypedTest/1" tests="1" failures="0" disabled="0" errors="0" time="*">
|
||||||
<testcase name="HasTypeParamAttribute" type_param="*" status="run" time="*" classname="TypedTest/1" />
|
<testcase name="HasTypeParamAttribute" type_param="*" status="run" result="completed" time="*" classname="TypedTest/1" />
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="Single/TypeParameterizedTestSuite/0" tests="1" failures="0" disabled="0" errors="0" time="*">
|
<testsuite name="Single/TypeParameterizedTestSuite/0" tests="1" failures="0" disabled="0" errors="0" time="*">
|
||||||
<testcase name="HasTypeParamAttribute" type_param="*" status="run" time="*" classname="Single/TypeParameterizedTestSuite/0" />
|
<testcase name="HasTypeParamAttribute" type_param="*" status="run" result="completed" time="*" classname="Single/TypeParameterizedTestSuite/0" />
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="Single/TypeParameterizedTestSuite/1" tests="1" failures="0" disabled="0" errors="0" time="*">
|
<testsuite name="Single/TypeParameterizedTestSuite/1" tests="1" failures="0" disabled="0" errors="0" time="*">
|
||||||
<testcase name="HasTypeParamAttribute" type_param="*" status="run" time="*" classname="Single/TypeParameterizedTestSuite/1" />
|
<testcase name="HasTypeParamAttribute" type_param="*" status="run" result="completed" time="*" classname="Single/TypeParameterizedTestSuite/1" />
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>""" % {'stack': STACK_TRACE_TEMPLATE}
|
</testsuites>""" % {
|
||||||
|
'stack': STACK_TRACE_TEMPLATE
|
||||||
|
}
|
||||||
|
|
||||||
EXPECTED_FILTERED_TEST_XML = """<?xml version="1.0" encoding="UTF-8"?>
|
EXPECTED_FILTERED_TEST_XML = """<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<testsuites tests="1" failures="0" disabled="0" errors="0" time="*"
|
<testsuites tests="1" failures="0" disabled="0" errors="0" time="*"
|
||||||
timestamp="*" name="AllTests" ad_hoc_property="42">
|
timestamp="*" name="AllTests" ad_hoc_property="42">
|
||||||
<testsuite name="SuccessfulTest" tests="1" failures="0" disabled="0"
|
<testsuite name="SuccessfulTest" tests="1" failures="0" disabled="0"
|
||||||
errors="0" time="*">
|
errors="0" time="*">
|
||||||
<testcase name="Succeeds" status="run" time="*" classname="SuccessfulTest"/>
|
<testcase name="Succeeds" status="run" result="completed" time="*" classname="SuccessfulTest"/>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>"""
|
</testsuites>"""
|
||||||
|
|
||||||
EXPECTED_SHARDED_TEST_XML = """<?xml version="1.0" encoding="UTF-8"?>
|
EXPECTED_SHARDED_TEST_XML = """<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<testsuites tests="3" failures="0" disabled="0" errors="0" time="*" timestamp="*" name="AllTests" ad_hoc_property="42">
|
<testsuites tests="3" failures="0" disabled="0" errors="0" time="*" timestamp="*" name="AllTests" ad_hoc_property="42">
|
||||||
<testsuite name="SuccessfulTest" tests="1" failures="0" disabled="0" errors="0" time="*">
|
<testsuite name="SuccessfulTest" tests="1" failures="0" disabled="0" errors="0" time="*">
|
||||||
<testcase name="Succeeds" status="run" time="*" classname="SuccessfulTest"/>
|
<testcase name="Succeeds" status="run" result="completed" time="*" classname="SuccessfulTest"/>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="PropertyRecordingTest" tests="1" failures="0" disabled="0" errors="0" time="*" SetUpTestSuite="yes" TearDownTestSuite="aye">
|
<testsuite name="PropertyRecordingTest" tests="1" failures="0" disabled="0" errors="0" time="*" SetUpTestSuite="yes" TearDownTestSuite="aye">
|
||||||
<testcase name="TwoValuesForOneKeyUsesLastValue" status="run" time="*" classname="PropertyRecordingTest">
|
<testcase name="TwoValuesForOneKeyUsesLastValue" status="run" result="completed" time="*" classname="PropertyRecordingTest">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="key_1" value="2"/>
|
<property name="key_1" value="2"/>
|
||||||
</properties>
|
</properties>
|
||||||
</testcase>
|
</testcase>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<testsuite name="Single/ValueParamTest" tests="1" failures="0" disabled="0" errors="0" time="*">
|
<testsuite name="Single/ValueParamTest" tests="1" failures="0" disabled="0" errors="0" time="*">
|
||||||
<testcase name="AnotherTestThatHasValueParamAttribute/0" value_param="33" status="run" time="*" classname="Single/ValueParamTest" />
|
<testcase name="AnotherTestThatHasValueParamAttribute/0" value_param="33" status="run" result="completed" time="*" classname="Single/ValueParamTest" />
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>"""
|
</testsuites>"""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user