src\e2e-test\and its classes have to be under the package
JavaBasedProjectGenerationTest. Let's take a look at the basic structure of a test class:
JavaBasedProjectGenerationTest.init()prepares the test environment setting the internal components required for generating a project and runs the XOOM Designer Server. Whereas,
clear()basically stops the application ran in each test case. As demonstrated above, ensure that both methods are invoked respectively at the right time of the test lifecycle.
src/e2e-test/resources/sample-models/[context-name]/. the values of
projectDiretoryhave to be updated to a replacement token (
%s) for the fact that these values will be dynamically resolved during the tests. Here's an example:
io.vlingo.xoom.designer.codegen.e2e.Projectobject which is also used to generate the project.
generateAndRunmethod receives the
Projectobject carrying the model settings which is submitted to the XOOM Designer API. Still, this method internally asserts that the project is properly generated. If the generation succeeds, the project will also be compiled and initialized. Otherwise, a message assertion error will be shown.
SupportingServicesManager.run()before the test cases are executed:
SupportingServicesManagerautomatically shut down the managed services when the test cases execution is done.