Test environment for WDL transpiler and Acknex3 API compatibility. It is used for batch testing successful transpilation of Acknex3 WDL files to C# code. The generated output can in turn be tested against the Acknex C# API. This project is to be used in conjunction with WDL2CS and AcknexCSApi.
WDLTransTest <config.xml> <testsuite.xml> [type1,type2,...]
For convenience, test.bat in the repository root can be used for execution.
Important: All path definitions given in any of the config and test xml files will be treated relative to the folder from where WDLTransTest is executed. This is not necessarily the same folder as where WDLTransTest is located (see test.bat).
Parameters:
config.xml
Configuration seetings related to transpiler and Acknex Api.
testsuite.xml
Several test cases arranged in testsuites.
type1,type2,...
Test type filters, e.g. transpiler
or api
. By using a filter, only tests of the specified types will be executed (optional).
It is required to clone following repositories:
<!--adjust pathes to your environment//-->
<environment>
<config type="generic">
<msbuild>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe</msbuild>
</config>
<config type="transpiler">
<prj-path>d:\git\other\WDL2CS\code</prj-path>
<vsproj>WDL2CS.csproj</vsproj>
<out-path>out\build</out-path>
</config>
<config type="api">
<prj-path>d:\git\other\AcknexCSApi\Acknex3Api</prj-path>
<vsproj>Acknex3Api.csproj</vsproj>
<out-path>out\build</out-path>
</config>
</environment>
It is important to adjust <prj-path>
to the file/project locations on the individual machine.
During testing, both Transpiler and the Acknex Api will be ocmpiled and copied to the folder specified with <out-path>
.
The type
attribute specifies what the config shall be used for specifically.
In general, the shown configuration layout does not need to be changed, except for the absolute pathes.
A testsuite serves as container for one ore more tests. Standalone tests cannot be executed - a testsuite is always needed.
Testsuites can be nested. It is also possible to reference testsuites from external files by using the file
attribute. The optional name
attribute can be used to give tests a specific name - this helps keeping the overview in bigger testsuites.
<testsuite name="Root">
<testsuite file="test.xml"/>
</testsuite>
<testsuite name="Root">
<testsuite name="subsuite">
<test name="Example" type="transpiler">
</test>
</testsuite>
</testsuite>
Test cases are mandatory to be children of a testsuite
. Test cases must not be nested in each other.
Via the type
attribute, the type of test case can be specified.
The name
attribute may be used to give test cases specific names.
<testsuite name="Kandoria">
<test type="transpiler">
<wdl-file>wdl\wok\game.wdl</wdl-file>
<cs-file>out\cs\wok\game.cs</cs-file>
<log-file>out\log\wok\transpile.log</log-file>
</test>
</testsuite>
<wdl-file>
Main WDL file with path<cs-file>
Output C# file with path (optional)<log-file>
Output log file with path (optional)
<testsuite name="Kandoria">
<test type="api">
<cs-file>out\cs\wok\game.cs</cs-file>
<exe-file>out\log\wok\game.exe</exe-file>
<log-file>out\log\wok\api.log</log-file>
</test>
</testsuite>
<cs-file>
Output C# file with path<exe-file>
Non-funtional executable with path (optional)<log-file>
Output log file with path (optional)
- Clone WDL2CS and AcknexCSApi repositories.
- Clone WdlTransTest repository.
- Go to
code
folder of WdlTransTest and openWDLTransTest.sln
. - Build Project in debug mode.
code\bin\Debug\WDLTransTest.exe
will be available after successful build. - Go to
cfg
and adjustconfig.xml
to your local setup. See Environment configuration. - Go to project root and execute
test wok.xml
to run the Kandoria sample test. - If everything is configured alright, enjoy the show.
Please respect license.txt