Wizard
Software Engineering Project - Wizard
Loading...
Searching...
No Matches
googletest-json-output-unittest.GTestJsonOutputUnitTest Class Reference
Inheritance diagram for googletest-json-output-unittest.GTestJsonOutputUnitTest:

Public Member Functions

 testNonEmptyJsonOutput (self)
 
 testNoTestJsonOutput (self)
 
 testTimestampValue (self)
 
 testDefaultOutputFile (self)
 
 testSuppressedJsonOutput (self)
 
 testFilteredTestJsonOutput (self)
 

Protected Member Functions

 _GetJsonOutput (self, gtest_prog_name, extra_args, expected_exit_code)
 
 _TestJsonOutput (self, gtest_prog_name, expected, expected_exit_code, extra_args=None)
 

Detailed Description

Unit test for Google Test's JSON output functionality.

Member Function Documentation

◆ _GetJsonOutput()

googletest-json-output-unittest.GTestJsonOutputUnitTest._GetJsonOutput ( self,
gtest_prog_name,
extra_args,
expected_exit_code )
protected
Returns the JSON output generated by running the program gtest_prog_name.

Furthermore, the program's exit code must be expected_exit_code.

Args:
  gtest_prog_name: Google Test binary name.
  extra_args: extra arguments to binary invocation.
  expected_exit_code: program's exit code.

◆ _TestJsonOutput()

googletest-json-output-unittest.GTestJsonOutputUnitTest._TestJsonOutput ( self,
gtest_prog_name,
expected,
expected_exit_code,
extra_args = None )
protected
Checks the JSON output generated by the Google Test binary.

Asserts that the JSON document generated by running the program
gtest_prog_name matches expected_json, a string containing another
JSON document.  Furthermore, the program's exit code must be
expected_exit_code.

Args:
  gtest_prog_name: Google Test binary name.
  expected: expected output.
  expected_exit_code: program's exit code.
  extra_args: extra arguments to binary invocation.

◆ testDefaultOutputFile()

googletest-json-output-unittest.GTestJsonOutputUnitTest.testDefaultOutputFile ( self)
Verifies the default output file name.

Confirms that Google Test produces an JSON output file with the expected
default name if no name is explicitly specified.

◆ testFilteredTestJsonOutput()

googletest-json-output-unittest.GTestJsonOutputUnitTest.testFilteredTestJsonOutput ( self)
Verifies JSON output when a filter is applied.

Runs a test program that executes only some tests and verifies that
non-selected tests do not show up in the JSON output.

◆ testNonEmptyJsonOutput()

googletest-json-output-unittest.GTestJsonOutputUnitTest.testNonEmptyJsonOutput ( self)
Verifies JSON output for a Google Test binary with non-empty output.

Runs a test program that generates a non-empty JSON output, and
tests that the JSON output is expected.

◆ testNoTestJsonOutput()

googletest-json-output-unittest.GTestJsonOutputUnitTest.testNoTestJsonOutput ( self)
Verifies JSON output for a Google Test binary without actual tests.

Runs a test program that generates an JSON output for a binary with no
tests, and tests that the JSON output is expected.

◆ testSuppressedJsonOutput()

googletest-json-output-unittest.GTestJsonOutputUnitTest.testSuppressedJsonOutput ( self)
Verifies that no JSON output is generated.

Tests that no JSON file is generated if the default JSON listener is
shut down before RUN_ALL_TESTS is invoked.

◆ testTimestampValue()

googletest-json-output-unittest.GTestJsonOutputUnitTest.testTimestampValue ( self)
Checks whether the timestamp attribute in the JSON output is valid.

Runs a test program that generates an empty JSON output, and checks if
the timestamp attribute in the testsuites tag is valid.

The documentation for this class was generated from the following file: