-
Notifications
You must be signed in to change notification settings - Fork 1
Test case directory and project structure in tmc langs
Until completed as a feature and merged with master, work in progress can be found in the forked TestMyQT/tmc-langs project under the branch template_folder_structure.
Test cases are located in the tmc-langs project.
Directory path for test cases is tmc-langs/tmc-langs-qmake/src/test/resources.
For each test case there exists a subdirectory where the relevant test case project file is located. In addition to the project file, each test case directory also contains the following subdirectories:
test case app contains the test case project file and relevant source and header files.
test_case_test_runner contains the test runner project file and relevant source and header files.
test_case_libs contains the library project file and relevant source and header files. This directory is only included for projects that make use of libraries. It is worth noting that in the test case of multiple libraries, each library is contained in it's own subdirectory, following a naming scheme of test_case_lib, test_case_lib2 and so on. The project, source and header file names for each library will reflect the name of the library directory to avoid confusion regarding library files.
passing_nolib - tests passing with no library included in the project
passing_nolib_same_point - as above with the addition of multiple (two) tests for function two*
passing_single_lib - tests passing with one library included in the project
passing_single_lib_same_point - as above with the addition of multiple (two) tests for function two*
passing_multiple_lib - tests passing with multiple libraries included in the project
passing_multiple_lib_same_point - as above with the addition of multiple (two) tests for function two*
failing_nolib - tests failing with no library included in the project
failing_nolib_same_point - as above with the addition of multiple (two) tests for function two*
failing_single_lib - tests failing with one library included in the project
failing_single_lib_same_point - as above with the addition of multiple (two) tests for function two*
failing_single_lib_not_compiling - build failing with one library included in the project, said library failing to compile
failing_compile_single_lib_compiling - build failing with one library included in the project, said library compiling as intended
*For clarification - starred test cases are used for a single function being tested with several tests, each of these tests awarding a different amount of points. This is done in consideration of there being a situation where passing multiple tests may be required to pass in order to reward score credit, for example.
Test case project structure follows our proposed structure for testing projects using the tmc-plugin.
The top level .pro file for the project defines the project to be using the SUBDIRS template. It also defines the location of the app, libraries and test runner and their corresponding dependencies.
The app, libraries and test runner all have their own corresponding headers, sources and .pro files.
In the top level .pro file the CONFIG variable options debug_and_release and debug_and_release_target are set as disabled for Windows. For creating your own projects, please add the following snippet into the beginning of your top level .pro file:
win32 {
CONFIG -= debug_and_release debug_and_release_target
}
If for some reason you would need to resolve the aforementioned library linking issues in Windows manually, please take the following steps:
- Having opened your desired project, click on the
Projectsbutton in the side pane. - Click on the
Detailsoption under theBuild Stepselement - Under
Additional arguments, please add the line"CONFIG -= debug_and_release debug_and_release_target"
Your libraries should now compile under correct directories when using Windows.




TODO:
Once the qmake support branch is merged with the original tmc-langs repo, include test case directory links for each test case in the repo to the description of the test case.
If there is time/BONUS LEVEL: add one more test case for simple testing of a simple user interface element.