1. Home
  2. Opkey Help
  3. 4. Working with Test Cases
  4. 4.3 Creating test case by adding test steps

4.3 Creating test case by adding test steps

noteTest step contains either a Keyword, a Control Flow Construct, Function Library file or Service Repository file. The added test step can be mapped further with object input argument, data input argument or step output as per requirement of your test scenario.

4.1.1 Adding Keywords to Test Steps

 

In this method of creating a Test Case, you can add keywords present in the OpKey library. There are 700+ inbuilt keywords present in the OpKey library which helps user to create test case for automation without writing any scripts/coding. To add new step within your test case, click on Add Test Step.

The keyword you want to use can be searched by typing the name of that keyword in the provided search box. All the keywords corresponding to the typed keyword are displayed in the dropdown list. You can select the desired keyword by clicking on ‘Add Keyword’ button. The selected keyword will be added to your test case step. You can update/replace a selected test step keyword by using ‘Update Keyword’ button of the new corresponding keyword. You can also add FL file(s) and SR method(s) as a test step in Test Case. Go to the ‘Add Keyword‘ tab and scroll down and select your FL/SR Method file and add it to your Test step.

noteYou can also add FL file(s) and SR method(s) as a test step in Test Case. Go to the ‘Add Keyword’ tab, scroll down & select your FL/SR Method file then add it as your Test step.

OpKey Keywords:

  1. Generic Keywords: OpKey generic keywords can be used to create test script & execute it with a commercial tool by selecting the corresponding plug-in during run time. For Example: SyncBrowser, SelectCheckBox, GetTableRowCount etc.
  2. System Keywords: The System Keywords in OpKey are the pre-defined generic functions independent of the plugin used. For Example: GetTimeAtTimeZone, StringContains.
  3. Control Flow Construct: Control flow construct keywords are responsible to execute certain sets of steps resulting in a choice. It contains the following categories: Comment, Condition, Iteration, and Obstruction. For Example PauseExecution, StopExecution, etc.
  4. Selenium Webdriver Keywords: Selenium Webdriver keyword is used to execute suite by directly opening a web browser rather than running scripts within the browser. They work only with the Selenium webdriver as a plugin. For Example, GetSingleRowText, GetObjectProperty etc.
  5. Visual Keywords: Keywords in this tab are plug-in specific and they are used to test GUI using referenced images. They work only with Visual as a plugin. For Example: CompareImageObjects, Paste etc.
  6. Appium Keywords: These keywords are specifically used while using Appium as a plugin for mobile devices. For example: CloseApplication, DoubleTouch etc.
  7. Robotium Keywords: Keywords in this tab are plug-in specific and applicable on Android applications. For Example: ClickOnText, IsEditTextEmpty etc.


Mapping the Test step with the object by using Object Input Argument – 

This feature allows you to map object, from object repository file, with the test case step as per your test scenario. When you click on any test case step, the corresponding object input arguments that can be associated/mapped with that test case step, are shown in the right pane.

Data driving the Test Case by using Data Input Arguments –

This feature allows you import data from the Global data repository file or from an Excel sheet (.xlsx files only). Map Global data repository file with the test case step as per requirement of your test scenario. This feature provides you flexibility to add dynamic value as data input argument to the test case step. The associated value of data input argument will replace the static value of test case step.

There are two ways of using data input arguments: Cyclic and Continuous (as shown in Repositories tab). Cyclic radio button helps you to run test steps again and again with different input data during the execution. On the other hand, when Continuous radio button is selected, data input argument(s) are used only once.

Output panel is used to reference keywords in a Test Case. The output of one test step can be associated as an input for the other test step. This panel plays an important task in referencing steps with each other.

For example: Output of a test step has assigned as ‘Output’ which is further associated with another test step as an input. Now, output of test case step acts as input for next test case step.

Select Test Step, navigate to the Step Output tab and provide name of the Output (Here Output).

Select further test step, navigate to the Data Input Argument tab, select Data Output and then select desired step output value.

Global Variable tab shows the global variables added from the Tools menu bar. Choose the desired global variable to add as a data input argument.

Mapping a Test step with a Step Output of an earlier test step –

This feature is used to reference keywords in a Test Case. The output of one test step can be made as an input for the other test step. This panel plays an important role in referencing steps with each other.

4.1.2 Executing a Test Case

noteThe Test Case can be executed by clicking over ‘Run Now’ & ‘Debug Now’ button which is described in upcoming section (Refer: https://opkey.com/Help/docs/opkey-help/execution-result/execution/)

Was this article helpful to you? Yes 1 No