Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How do I export a recorded Test Case or Project from the SilkTest Recorder to Silk4J?

How do I export a recorded Test Case or Project from the SilkTest Recorder to Silk4J?

Use the following procedures to export a recorded test case or project from the SilkTest Recorder to Silk4J

Exporting a Project to Silk4J

You can export projects from the SilkTest Recorder to SilkTest in order to use Silk4J as the primary GUI for tests and to organize test methods.

1. Choose File ? Export.

The Export wizard opens.

2. Double-click Export as Silk4J Project.

The Export as Silk4J Project page opens.

3. In the Project location text box, specify the location to which to export the project. Optional: Click and navigate to the folder that you want to use.

4. In the Project name text box, specify the project name. For example, type Web Sample Project.

5. In the Package text box, specify the package name. For example, type com.example.

6. In the Test class text box, specify the class name to which the test belongs. For example, type AutoTests.

7. In the Test method text box, specify a name for the test method. For example, type testAutoInput.

8. From the File encoding list box, click the type of file encoding to use.

9. Click Finish.

The Recorder creates a project and exports it to Silk4J.

Import the project with Silk4J. The new project contains a base state and test method and is ready for testing. For details about importing a project, refer to the Silk4J User Guide.

Exporting a Test Method to Silk4J

You can export test methods from the SilkTest Recorder to SilkTest in order to use Silk4J as the primary GUI for tests or to copy the JTF script to the Clipboard.

1. Choose File ? Export. The Export wizard opens.
2. Double-click Export as JTF Script.

The Export to JTF page opens.

3. From the Export to list box, click one of the following options:

  • Clipboard – Copies the JTF script to the clipboard.You might choose this option if you want to copy and paste the script into an existing JTF script.

  • JTF Script – Exports the script to Silk4J.You might choose this option if you want to create a new script or overwrite an existing JTF script.

4. In the Test method text box, specify a name for the test method. For example, type testAutoInput.

5. In the Package text box, specify the package name. For example, type com.example.

6. In the Test class text box, specify the class name to which the test belongs. For example, type AutoTests.

7. In the Source folder text box, specify the location to which to export the test. Optional: Click and navigate to the folder that you want to use.

8. From the File encoding list box, click the type of file encoding to use.

9. To include the base state in the exported script, check the Use base state check box.

The base state makes sure that the application that you want to test is running and in the foreground. This ensures that tests will always start with the same application state, which makes them more reliable. In order to use the base state, it is necessary to specify what the main window looks like and how to launch the application that you want to test if it is not running. Creating a base state is optional. However, it is recommended as a best practice. If you export to JTF, a separate silk4J.settings file is created for the base state. If you export to the Clipboard, a Before method includes the base state.

10. Click Finish.

The Recorder creates a Java script and exports it to Silk4J or to the Clipboard.

Old KB# 30546

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 20:48
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.