Executing module tests as part of MPS build usually requires writing non-trivial build scripts, which then need to be integrated into the main MPS build script at the correct place. This HOWTO describes the easier solution, which requires declaring a TestModuleManifest and keeping the
Inner working details
The prototype model of the latter file (
jetbrains.mps.ide.build.tests.generatedTests) is itself generated from the user-defined test manifests collected in another solution auxiliary model (
This last solution model contains a single instance of TestProjectConfiguration asTestProjectConfiguration enumerating the test module manifests to be included in the test process.
Following are the detailed instructions on using this functionality.
- In your test model declare an instance of TestModuleManifest (a root node).
- Populate this instance with the references to languages/solutions that execution of your test require.
NOTE: only the modules in addition to the standard MPS configuration need to be listed.
- Open the model
jetbrains.mps.build.mps.testModulesand add a reference to this manifest to the list in mpsTestModules root.
NOTE: this model contains a single instance of TestProjectConfiguration named "mpsTestModules". It is not expected to contain anything beside this root node.
- Invoke the action "Refresh Test Project" on the same root node mpsTestModules. This may require invoking "Go To Action".
This action updates the contents of the model
NOTE: all manual changes in this model will be lost. DONT EDIT THIS MODEL.
HINT: the action "Refresh Test Project" is defined by the plug-in solution
- After running make on the project, the build files should be updated and ready to run the tests.
|Content by Label|