Exporting test methods
Use the OpenText Functional Testing for Developers Test Export tool to export your test methods. Then, import the tests into OpenText Application Quality Management. For details, see Import tests into OpenText Application Quality Management.
From the command line, run the export tool relevant to your testing framework. These are located in the <Installdir>\Tools\TestExportTool folder.
NUnit/MSTest
Run LFTTestExportTool.exe, providing the path of your test project DLL.
Note: The export tool uses NUnit as the default framework so you do not need to specify the framework.
However, for MSTest, make sure to specify the framework as well, as demonstrated in the example below.
Example for NUnit:
"<Installdir>\Tools\TestExportTool\LFTTestExportTool.exe" "C:\FunctionalTesting\MyNUnitTests.dll"
Example for MSTest:
"<Installdir>\Tools\TestExportTool\LFTTestExportTool.exe" "C:\FunctionalTesting\MyMSTestTests.dll" -framework:MSTest
TestNG
Run test-export-tool.jar, providing the path to your test project .jar and your testng.jar.
Tip: To simplify, use the %CLASSPATH% environment variable to set the testng.jar paths.
Use the following syntax:
java -jar <export tool jar><OpenText Functional Testing for Developers project jar path>-classpath:<testng.jar path>‑framework:TestNG
or
java -cp "<export tool folder>/*;<testng.jar path>" com.hp.lft.testexporttool.ExportTests<OpenText Functional Testing for Developers project jar path>‑framework:TestNG
Note: The export tool uses JUnit as the default framework. Therefore, be sure to specify the TestNG framework in the command.
Examples
-
Using -jar:
java -jar "<Installdir>\Tools\TestExportTool\test-export-tool.jar" "C:\FunctionalTesting\MyTestNGTests.jar" -classpath:"C:\TestNG\testng.jar" ‑framework:TestNG -
Using -cp
java -cp "<Installdir>\Tools\TestExportTool/*;C:\TestNG\testng.jar;" com.hp.lft.testexporttool.ExportTests "C:\FunctionalTesting\MyTestNGTests.jar" ‑framework:TestNG
JUnit 4
Run test-export-tool.jar, providing the path to your test project .jar and your junit.jar.
Use the following syntax:
java -jar <export tool jar><OpenText Functional Testing for Developers project jar path>-classpath:<junit.jar path>
or
java -cp "<export tool folder>/*;<junit.jar path>" com.hp.lft.testexporttool.ExportTests<OpenText Functional Testing for Developers project jar path>
Example
-
Using -jar:
java -jar "<Installdir>\Tools\TestExportTool\test-export-tool.jar" "C:\FunctionalTesting\MyJUnitTests.jar" -classpath:"C:\JUnit\junit.jar" -
Using -cp:
java -cp "C:\Program Files (x86)\OpenText\Functional Testing for Developers\Tools\TestExportTool/*;C:\JUnit\junit.jar;" com.hp.lft.testexporttool.ExportTests "C:\FunctionalTesting\MyJUnitTests.jar"
Hamcrest JAR
Some versions of JUnit require adding the Hamcrest JAR path to the classpath argument of the export tool command line. If yours does, use the following syntax, using a semi-colon delimited list for the classpath:
Tip: To simplify, use the %CLASSPATH% environment variable to set the junit and hamcrest jar paths.
java -jar <export tool jar> <OpenText Functional Testing for Developers project jar path> -classpath:"<junit.jar path>;<hamcrest-core.jar path>"
or
java -cp "<export tool folder>/*;<junit.jar path>;<hamcrest-core.jar path>" com.hp.lft.testexporttool.ExportTests<OpenText Functional Testing for Developers project jar path>
Examples:
-
Using -jar:
java -jar "<Installdir>\Tools\TestExportTool\test-export-tool.jar" "C:\FunctionalTesting\MyJUnitTests.jar" -classpath:"C:\JUnit\junit.jar;C:\JUnit\hamcrest-core.jar" -
Using -cp:
java -cp "<Installdir>\Tools\TestExportTool/*;C:\JUnit\junit.jar;C:\JUnit\hamcrest-core.jar" com.hp.lft.testexporttool.ExportTests "C:\FunctionalTesting\MyJUnitTests.jar"

