Before you can create a keyword-driven test in
Silk4J, you have to select a project.
To record a single keyword, see
Recording a Keyword.
To record a new keyword-driven test:
-
Click
.
The
New Keyword-Driven Test dialog box opens.
-
Type a name for the new
test into the
Name field.
-
Select the project in which the new
test should be included.
By default, if a project is active, the new
test is created in the active project.
Note: To optimally use the functionality that
Silk4J provides, create an individual project for each application that you want to test, except when testing multiple applications in the same test.
-
Click
Finish to save the keyword-driven test.
-
Click
Yes to start recording the keyword-driven test.
The
Record Keyword-Driven Test dialog box opens.
-
If you have set an application configuration for the current project and you are testing a Web application, the
Select Browser dialog box opens. Select the browser on which you want to record the keyword.
-
Depending on the dialog that is open, perform one of the following:
- In the
Select Application dialog box, click
OK.
- In the
Select Browser dialog box, click
Record.
-
In the application under test, perform the actions that you want to include in the first keyword.
For information about the actions available during recording,
see
Actions Available During Recording.
-
To specify a name for the keyword, hover the mouse cursor over the keyword name in the
Recording window and click
Edit.
Note: Silk4J automatically adds the keyword
Start application to the start of the keyword-driven test. In this keyword, the applications base state is executed to enable the test to replay correctly. For additional information on the base state,
see
Base State.
-
Type a name for the keyword into the
Keyword name field.
-
Click
OK.
-
To record the actions for the next keyword, type a name for the new keyword into the
New keyword name field and click
Add.
Silk4J records any new actions into the new keyword.
-
Create new keywords and record the actions for the keywords until you have recorded the entire keyword-driven test.
-
Click
Stop.
The
Record Complete dialog box opens.
-
Optional: In the
Package text box, specify the package name.
For example, type:
com.example.
To use an existing package, click
Select and select the package that you want to use.
-
In the
Test class text box, specify the name for the test class.
For example, type:
AutoQuoteInput.
To use an existing class, click
Select and select the class that you want to use.
-
Click
OK.
Silk4J creates the new keyword-driven test with all recorded keywords.