Commit a3cfb9c9 authored by Stuart Sides's avatar Stuart Sides Committed by Laura, Jason R
Browse files

Updated Writing ISIS Tests Using Gtest and Ctest (markdown)

parent ffd75294
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -85,9 +85,9 @@ INSTANTIATE_TEST_CASE_P(
will ensure that the tests start with `BundleSettings`.

# Test names
We use gtest as our unit testing framework, but use ctest to actually run the tests. The test name can be defined in the test definition. The naming convention for gtests is `UnitTest<Object><test case>` for unit tests and `FunctionalTest<app name><test case>` for app tests each in upper camel case. Source files should follow a similar pattern of `UnitTest<Object>.cpp` and `FunctionalTest<app>.cpp`. The documentation for how this works can be found in [cmake's documentation](https://cmake.org/cmake/help/v3.13/module/GoogleTest.html).
We use gtest as our unit testing framework, but use ctest to actually run the tests. Test name can be defined in the test definition (cpp file). The naming convention for gtests is `UnitTest<Object><test case>` for unit tests and `FunctionalTest<app name><test case>` for app tests. Both are upper camel case. The documentation for how this works can be found in [cmake's documentation](https://cmake.org/cmake/help/v3.13/module/GoogleTest.html).

>**Note:** App names are considered a full word for camel case purposes. So when naming an test file or function, only capitalize the first letter of the app name. 
>**Note:** App names are considered a single word for camel case purposes. So when naming a test file or function, only capitalize the first letter of the app name, even if the app name is made up of multiple words. 

To run the gtests for a specific class, use `ctest -R ClassName`