App Studio currently supports unit testing (UT), including automatically generating UT code, detecting the entry for UT, running UT code, and displaying the UT result.
Automatically generate UT code
Detect the entry for UT
- UT class files must be stored in the src/test/java directory. A Java UT class file that is not stored in this directory cannot be identified as the Java UT class.
- For a method annotated with @Test annotation, Run Test appears, indicating the entry for UT.
org.junit.Testto the corresponding sample UT method.
Run UT code
Click the Run icon in the upper-right corner. The sample UT starts.