- Once the tests are written, download the file(s) by selecting their respective folder.
- Using the console, navigate to the SDK installed folder to compile the downloaded file(s) like below
Synopsis
stc -i sourceDirectory -i AxUnit.Library -o outputDirectory -t axunit
where
- -i|--input The directory that contains the downloaded ST file with the unit tests; multiple inputs are possible
- -o|--output The directory where all compile artifacts are output to
- -t|--target Specifies for which target to compile. Supported values: axunit, 1500, llvm (use axunit for unit tests)
- -s|--simulation Whether to compile to the PlcSim Advanced simulation target.
Example
stc -i D:\myFirstProgram\src -o D:\myFirstProgram\bin -t axunit
Note
On successful run the output directory should contain a TestCasesMeta.xml file.
You may also download the entire project and create the test binaries without explicitly mentioning multiple inputs like below
stc -i D:\myFirstProgram\project-source -o D:\myFirstProgram\bin -t axunit