-
Notifications
You must be signed in to change notification settings - Fork 89
tests v4 guidelines
Nedelcho Delchev edited this page Mar 8, 2021
·
1 revision
Testing the different types of modules as follows:
Standard Java modules should be tested by utilizing JUnit 4.0.
Sample can be found here
Guice framework is used for dependency injection. The unit test which require such functionality should extend the AbstractGuiceTest.
Sample can be found here
Facades are Java based modules, so that along with the above guidance here could be added a dependency to the external service, if any.
Samples:
- Without dependency can be found here
- With mocked service can be found here
- With built-in service can be found here
Testing Javascript APIs is the most complex one.
- First there should be written the Javascript test like is shown here
- Second the test should be added to AbstractApiSuiteTest
- If needed some of the method should be mocked as shown here
- Run test suite from one of the test classes extending the AbstractApiSuiteTest like GraalVMApiSuiteTest
The whole process can be done separately like it is done here