Common Error Scenarios while authoring Test Cases in OpKey

In previous part of this blog(http://opkey.crestechglobal.com/blog/?p=84), we understood how to rectify the errors that occur in execution result due to mishandling the control flow constructs (If-Else-EndIf, For-Next) while scripting a test case in OpKey.

In this part of blog, we will discuss on Category B (Error in providing data to keywords\Constructs) type error that can occurs due to provide invalid data while scripting a test case.

Category B: Error in providing data to keywords\Constructs.

While scripting a test case, we can usually do the following mistakes while providing the data to keywords\Constructs.

1)       Argument Data Missing
2)       Object Not Found
3)       Argument Data Invalid
4)       Step Timed Out

Now, time begins to discuss on them turn by turn. Sometimes, it can happen that we forget to provide some mandatory input arguments and provide invalid data to a test case step.

1) Argument Data Missing

Consider a following test case in which no object is associated with Object Input Arguments.35

Now execute an above test case. Below execution result reveals that typeTextOnEditBox step is NotExecuted with an error message “Data not provided for argument:’ORObject’.Excepted static value was empty”. Step could not be executed due to not provided value to one of its mandatory arguments.36

2) Object Not Found

Consider a following test case in which we left blank the data value of data input arguments of a step (openBrowser).37

Its execution result reveals that due to provide blank data to Browser and URL input arguments of openBrowser step, default browser is launched and its below steps typeTextOnEditBox and Click are failed with an error message “Selenium Exception Error: Element not found” because object on which action was to be performed is not found on the currently active page.38

The data may be provided to the input arguments through one of many resources like statically entering, output of a previous step, a global variable etc but it must not be left blank.

3) Argument data Invalid

Sometimes, it may be happen that by mistake we can provide the invalid data to input arguments of test case as like below test case.39

In above test case, we provide the invalid data due to which its execution result gets in completed with an error message “Unable to convert” as required data is integer and we provide string data value as seen in below Fig.40

4) Step Time Out

Step TimeOut – The maximum time to be taken by keyword is defined by setting the Step TimeOut in the Execution Now Wizard. In below Fig, we set the Step Timeout to 5 sec. Now starts the run.41

In below execution result,we have seen that steps Open Browser and Sleep are failed with an error message “Step timed out .System waited for 5000 ms” because these steps requires more than time to 5 sec.42

While configure the execution settings, we require to concentrate on that type of setting due to which our run can be failed.

In next series of this blog ,we will discuss on some other errors type.

 

Use of Output Values in OpKey Using Referencing

Reference is a relation between objects in which one object Output is used as an input to another object.

  •  The first object in this relation is said to refer to the second object.
  • The second object (the one to which the first object refers) is called the referent of the first object.

In OpKey referencing is done between two steps. These steps may be Pre defined Keywords, User defined keyword, System Keywords, Control Flow constructs and Function Library. Functional Library is not available in the OpKey Personal Edition but in the Team and BPT Edition we can call or add Function Library under Test Cases.

In OpKey personal Edition we use Pre defined Keywords, User defined keyword, System Keywords and Control Flow constructs for referencing. When we use One Step Output as an Input in the second step then this is called as Referencing. We cannot use first step output in the second step if First step Output data type and second step input data type  mismatch i.e. If Second Step input data type is integer and First step Output is String data type so we cannot use first step output in the second step. 31

Let’s take some real word scenario: -If user want to compare output value of first step (i.e. FOR ) as an input value of second step (i.e. IF) then he/she needs to reference the output of first step(i.e. FOR ) with the second step (i.e. input parameter of IF).  User can use this output further in multiple steps.

How to implement this Scenario in OpKey: - 

Keyword Input Output
FOR 2 FOR
IF “FOR” = 1

1.In Test case add a step and define its output variable in Step output section on right panel.

32

 

2.Add second step in which you want to use the output of first step.
3.Select output tab in Provide Data Value for Data Input Argument section on right panel.33

4.Choose the output variable that is defined for first step.34

5.Save the Test case and Execute.

Common Error Scenarios encountered while authoring test case- Part 1

As all of us know that, to err is human. While creating a test case, it could happen that by mistake we forget to add the necessary steps in test case due to which execution of that test case might be failed.

In this article, we will try to understand the type of errors that we usually do while creating a test case. First of all we will categorize the errors as mentioned below:

Category A: Error in usage of Control flow constructs (IF-ElSE-ENDIF and FOR-NEXT).
Category B: Error in providing data to keywords\Constructs.
Category C: Error in Object of the application.
Category D: Plug-in Specific Errors.

In this article, we will discuss on Category A type error. While we use if’s and for’s control flow constructs in test case, we usually do the following mistakes.

1) IF_WITHOUT_ENDIF

Consider the below test case in which we can clearly see that we skipped the EndIF Step.20

Now try to execute it. In Execution Result Section of OpKey, we can see the result of above executed test case. Below fig reveals that IF step is NotExecuted with an error message An IF keyword is not properly matched to an ENDIF keyword. Every IF keyword must be properly matched with its conjugate ENDIF and vice versa. Also the ENDIF keyword must appear after the IF keyword”. Execution result status is incomplete because of there is no end point of IF.21

2) ENDIF_WITHOUT_IF

Consider the below test case in which one of the necessary IF Step is missing.22

Its execution result reveals that EndIf Step is Notexecuted with an error message “An ENDIF keyword is not properly matched to an IF keyword. Every ENDIF keyword must be properly matched with its conjugate IF and vice versa. Also the ENDIF keyword must appear after the IF keyword”. Because of there is no starting point of EndIf.23

3) DANGLING_ELSE

Similarly, below fig reveals an error “An ELSE keyword is not properly matched to an IF/ENDIF keyword pair. Every ELSE keyword must be properly surrounded by IF and ENDIF keywords” which occurs due to add dangling ELSE in test case without having its dependant steps.24

4) FOR_WITHOUT_NEXT

Consider the below test case in which we are trying to iterate the steps 2 times.25

But its execution result reveals an error   A FOR keyword is not properly matched to a NEXT keyword. Every FOR keyword must be properly matched with its conjugate NEXT and vice versa. Also the NEXT keyword must appear after the FOR keyword”  which occurs due to mishandling the FOR behavoiur while scripting the above test case.26

5) NEXT_WITHOUT_FOR

Similarly, in below test case we mishandle the NEXT behavior without having its conjugate FOR Step.27

Due to this mishandling, execution result reveals an error message A NEXT keyword is not properly matched to a FOR keyword. Every NEXT keyword must be properly matched with its conjugate FOR and vice versa. Also the NEXT keyword must appear after the FOR keyword” with NotExecuted Status.29

To avoid above mentioned errors, look at the correct way of scripting a test case in OpKey.30

 

Next part of this blog will make you understand other errors that can occur due to provide invalid data to test case.

 

How to use data from external sources in your test automation with OpKey

To either perform test automation of your data in database; or to fetch data at run time from your application database during test automation, we need a provision to talk to external data sources. Most of the times such databases are sacrosanct and data in them is secured. It is not advisable in these situations to use Opkey data repository to manage data when you already have a database solution to take care of it.

OpKey allows you with its predefined set of keywords to communicate with any RDBMS database solution. For connecting OpKey to external data source (database) like MySql, Oracle, and SQLServer etc We have main three system keywords.

  • Connect Database.
  • Execute Query.
  • Disconnect Database.

Description of Database System keyword

  1. Connect Database:  This keyword proves helpful while connecting OpKey to a external database

This system keyword has 2 parameters:

  • Driver:

Specify from which database connection is to made eg(MySql,Oracle,SQL-Server etc)

  • Connection string:

To connect to a data store(DB), connection string property is needed

e.g.: connection string for SQL Server: Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;24 2.      Execute Query This system keyword have 1parameters:

  • Query:

 

Specify the query which you want to do for example select, update, and delete a record     from a database

Other Constrcuts like Execute Query: 

Like Execute Query other database system keywords are present which also behaves same as execute Query (i.e. select, update and delete operation in a database) name of those database system keyword is mentioned below.

For other database system keyword you can read online help of OpKey Personal Edition:

http://opkey.crestechglobal.com/help/pages.php?subid=62&accordid=4#Handling-Database-Operations
3
.      Disconnect Database: After task related to database is done, disconnect Opkey from the connected database.

Working Test Case Scenario for connecting OpKey to external database.

Description of TestCaseScenario: 

In this Test case scenario, we will open login page of CresTech intranet site, which requires loginid and password, for login id and password field we will fetch value from CresTech Intranet site Database.To fetch username and password from CresTech Intranet site Database we will use FetchValueFromDatabase System keyword and output of system keyword will be used for userid and password, Testcase screen shot is depicted below.25

User info Table structure containing the credentials for logging into CreTech Intranet Set26

Working of Test Case Scenario:

1.      On execution of this test case CresTech intranet set login page will launch.
2.     
Fetchvaluefromdatabase system keyword will execute and will get the username and password form CresTech intranet site database.
3.     
Userid and password fetcedh from the Fetchvaluefromdatabase system keyword will be used as userid and password for CresTech intranet site.
4.     
After userid and Password is typed in CresTech intranet Login page by plugin, Login button is clicked present in the login page.
5.      On clicking of Login Button Welcome Page of CresTech intranet site is launched.
6.      On the Welcome Page username is displayed which was same as present

CresTech Intranet site database, which is depicted below in the attached screen shot?28So we have seen how can with OpKey we can connect and use data from external data sources with ease.

How to handle Popup windows with OpKey

Quite a times in automation we face applications where an end user flow is only completed by saying yes/ no in a pop up window. Most of the open source tools have complex programs; and insufficient documentation available to handle them.

Also, we at times encounter situations where an unexpected pop up come and our automation run is hampered by it. The handling of both kinds of expected and unexpected popup windows are available in OpKey and that to with ease.

In OpKey Personal Edition, for handling popup which sometime occurs during the execution, we have two system keywords which can be used as per the need.

  • HandleExpectedPopup
  • RecoveryHandlePopup

HandleExpectedPopup:
This system keyword has 3 Inputs:
i)WindowTitle:
Specify the title of the window which is to be handled.
ii)NumberOfTabs:
Specify the number of times the Tab key will be pressed and at last Enter key will be pressed.
iii)WaitTime:

Specify the duration with in which this system keyword will handle the specified popup.
How to Use:
In a test case, we add a step from where we want to activate Popup Handling and select HandleExpectedPopup system keyword.
Working:
Execution of the step of the test case which contains the HandleExpectedPopup system keyword will activate popup handling. After that if any popup occurs having same window title as specified in the input value of the system keyword and its waiting time is remaining then that system keyword will press Tab key as per the specified number of times and then it will press an Enter key. After that the execution will continues accordingly.

This system keyword can be used for handling only one popup during the execution.
RecoveryHandlePopup:
This system keyword has 2 Inputs:
i)                    WindowTitle:
Specify the title of the window which is to be handled.
ii)                  NumberofTabs:
Specify the number of times the Tab key will be pressed and at last Enter key will be pressed.

How to Use:
In a test case, we add a step from where we want to activate Popup Handling and select RecoveryHandlePopup system keyword.

Working:
Execution of the step of the test case which contains the RecoveryHandlePopup system keyword will activate popup handling. After that if any popup occurs during the complete execution of the test suite having same window title as specified in the input value of the system keyword that system keyword will press Tab key as per the specified number of times and then it will press an Enter key. After that the execution will continues accordingly.
This system keyword can be used for handling all popup with specified window title during the complete execution of the test suite.
How to implement this Scenario in OpKey:

  • 1.Create a test case having HandleExpectedPopup System keyword and RecoveryHandlePopup System keyword for handling popup as shown below:

 

  • 20Specify the Input Values of these steps of the test case:21
    2. When these steps will execute then while login in yahoo mail account a message will occur as shown
    22This popup will be handled by the HandleExpectedPopup System keyword because its window title is same as specified in the input values. Then the user will continue with their proceedings.
    3. Each time Mozilla Firefox opens, it asks for making the browser as default browser if it is already not set, then to handle these kinds of message boxes we can use RecoveryPopupHandle System keyword because it will handle popup in the complete execution.23
    4. Further the normal execution will continues.

 

Hassle free maintenance of your test automation with OpKey

Maintainability is the ease with which a product can be maintained in order to:

  • isolate defects or their cause
  • correct defects or their cause
  • meet new requirements
  • make future maintenance easier, or
  • cope with a changed environment

In the world of Automation testing, Engineer’s face several challenges in creating and maintaining the automated test scripts. OpKey works like a charm in meeting those challenges.

Example: Changing properties of objects

The challenge mostly faced in automation testing is the changing properties of objects. Let’s have an example for OpKey dealing with such situations. Suppose I have a test script which clicks on an object with name “Sign In”. So I have added an object in ObjectRepository with “name” property set to “Sign In” as shown below:14

Now I have used this object in my “TestCase” and executed it. It works perfectly fine but when next day I executed the same script it fails saying “Object with specified properties not found”. To resolve the nightmare when I checked the object properties I found that the site developer has changed the “name” property of that object. The new “name” is “Sign_In”. So instead of modifying my whole script I simply modified the updated property in my “ObjectRepository” as shown below:15

Again executing the same script with this minute change in object properties worked perfectly.

 

 

 

Example: Dealing with frequently changing data

 

Another challenge we normally face is the frequently changing data. Let’s have another example to see the ease with which OpKey handle such situations. Suppose I have created a test script which takes “username” and “password” as input for login. So I have created a DataRepository in OpKey with two columns “User Name” and “Password” as shown below:16

Now I have used this DataRepository in my testcase. It works perfectly till these user’s are eligible to login but what if these users are deleted by the administrator or they are no more eligible to login? Do I need to re-write my test scripts? The answer is NO; OpKey ease with data management provides flexibility to modify the existing data without modifying the scripts. I can simply provide the updated credentials in my DataRepository as shown below:17

Again executing the same script worked absolutely fine.

Example: Dealing with changing objects behavior

Another challenging situation arises due to the modifications in behavior of an object. Let’s have another example for this situation. Suppose I have a “TestCase” skipping the text in a non-mandatory field. So I have added steps in my “TestCase” for filling the mandatory fields and clicking the submit button as shown below:18

It was executing fine till I faced a situation where one non-mandatory field becomes mandatory. But thanks to OpKey for meeting the new requirements and adapting the changing environment very easily. I have simply modified my “TestCase” by adding a new step for the new mandatory field as shown below19

Just with this simple modification my existing script again started working absolutely fine.

I love OpKey for its great features and handling the most challenging situations very easily. Just like its name we can open complex locks with one master key called “OpKey”.

 

 

Use Of Global Variable In OpKey

Global Variable in OpKey is same as Global variable in any programming language that can be accessed throughout the project. These variables can prove to be very useful when an Automation engineer want a variable to be shared across various Test cases.

Let’s see how we can create Global Variable through OpKey-:

In OpKey you can use Global Variable by navigating to Tools Menu and selecting Global Variables sub-menu from drop-down list that appears. Once you click this sub-menu, the Global Variable window will open up12

Global Variable Window in OpKey

 

On Global Variable window you can specify the Global Variable Name, Data Type and Value.
Give Global Variable Name, Data Type and Value as-:

NAME DATA TYPE                                          VALUE
Browser String Mozilla Firefox
URL String www.crestechglobal.com

In OpKey there are wide range of Data Types (String, Integer, Boolean, Double, DateTime) and you can change the Data Type according to your requirements. After Specifying the Global Variable you can save them. Once Global Variables are created we can use them in Test Case.

How to use Global Variable in Test Case-:

You can Navigate to the Test Case Module and add Keyword as “OpenBrowser” and select the Global Variable Value from the desired variable drop down list which is created previously to provide the Data Values for Data Input Argument.13

Now whenever the “Browser” global variable will be used it will fetch value “Mozilla firefox”. To change the value; go again to the global variable window, select the variable and edit the value.  All test cases using this global variable will now pick a new value.

So we have seen How OpKey Personal Edition provides end user same facility as in programming languages to tackle complex Scenarios. And handle the Reusability of defined variables.

 

How to define your own keyword in OpKey

A few days back, i needed to automate my company’s intranet site to check for some new posts or updates and ‘Like’ it, if the post is from my best buddies or the ‘HR’ ;-) Furnishing this with OpKey was an easy task.

As the intranet site was itself in a very naive phase, every other day the site was down for maintenance for a couple of hours. This affected my execution cycles in OpKey and they failed when the intranet site was unreachable. I thought to add a ‘Ping’ condition in my TestCase, so that my TestCase is somewhat like this:

boolean pingResult = Ping(“www.myIntranetSite.com”)
If(pingResult = true)
{
//perform the actual ‘Liking’ steps using selenium here
}
else
{
//do nothing.
}

I was just one step away from being the most active member on the intranet, but there was no Ping keyword available in the standard keyword set of OpKey Personal Edition.

So i decided to create my own Ping keyword, a custom keyword. I created a simple java jar(SeleniumCustomKeywordLib.jar) via eclipse, which looked like:

public class KeywordLibrary extends SeleniumLib {
public String method_Ping(String Hostname) throws Exception {
String cmd = “ping.exe -n 1 ” + Hostname; // ping only 1 time
Process p1 = java.lang.Runtime.getRuntime().exec(cmd);
int returnVal = p1.waitFor(); // wait for the process to exit
if (returnVal == 0) {
return outputString(“true”, true, “Ping Successful to ” + Hostname, 0);
} else {
return outputString(“false”, true, “Unable to ping ” + Hostname, 0);
}
}
}

Uploading the custom keyword Library

  • I uploaded this jar(SeleniumCustomKeywordLib.jar) on OpKey by using the Add Library option available in the Keyword Management Wizard provided in the Tools Menu.
  • Registered the custom keyword with OpKey by Add Custom Keyword option

○     KeywordName            :           Ping
○     AssociatedMethod      :           method_Ping
○     Description                 :           Executes the standard ping command.
○     Arguments
■     Hostname                  :           String
○     Plugin                         :           Selenium
○     OutputType                :           Boolean
○     Associated Library     :           Pinger.jar

  • Saved it.11Now this keyword was available to use in all my TestCases under Selenium Plugin’s Custom group. Then i added this newly created keyword in my TestCase, and it worked like a charm. My manager still wonders how do i like all her posts within moments…

OpKey Personal Edition vs Other Automation Frameworks

With the increment of innovation in technology, newer applications are emerging day after another on web, mobile, desktop, etc and to test all such latest applications on such platforms becomes critically important in order to check the feasibility & viability of those applications. Here, testing engineers (both manual & automation) plays a vital role. But to test applications like web, web services, mobile, desktop, etc, they need a dedicated Automation Framework which can ease their testing process.

In the present scenario, various Automation Frameworks & Automation tools are present in the market which all has their own advantages, functionalities & features. To choose a framework which suits all your needs & requirements as a tester is a difficult task. In here we have complied a list of some of the most used automation frameworks available in the market and compared them on the criteria of most used features in test automation.
10

We found that Opkey had many advantages over the available frameworks in the market and no wonder it is also known as - The Smartest Automation Framework and that too available for FREE.

 

 

Dealing with challenges of automating testing of Multilingual Websites

Necessity of Multilingual Websites:-

To tap the growing market and to target audience consists of speakers of different languages organizations are developing their sites that support multiple languages. For Example if an Indian Firm is aiming a Spanish, French or Chinese Audience it requires the native languages of the countries to capture more and more Audiences. Here emerges the necessity of Multilingual Websites.

Challenges in Automating Multilingual Websites:-

Suppose, an Automation Engineer has created Automation Suite on a Website of English language. Now organization wants to target audience of Spain so they develop the same site in Spanish language what the business want from the Automation Engineer is to execute the same suite on the website of Spanish language. Guess what when the language of website is changed from English to Spanish the properties (i.e. inner text) of all objects are being changed and the suite that was working on same website of English language stops working on the same website of Spanish language.

How OpKey handles the challenge:-

OpKey handle the challenge by a prebuilt System keyword named as SetOR. SetOR Facilitates user to execute a suite that is authored on a website of one language can be executed on the same website of multiple languages. For Example: If a test is authored using English version of the objects (like, links and texts) and the user wants it to be executed in Spanish/Germen language. Then, during execution the user can redirect the Object Repository to some other Object Repository by specifying its path.

How SetOR Works:-

SetOR swaps the original Object Repository (English OR) to Spanish/Germen Object Repository at run time.

Let me explain with following example:-

A test suite is authored as:
ClickOnLink (“Click here”)         //written using English version

But, Automation engineer needs to execute same test on Spanish version of the page where the link says ‘klicken Sie hier’. Ideally, user has to create a different Object Repository and re-create the tests with the objects of Spanish Object Repository. But, by using Set OR keyword, user gets the flexibility to declaratively choose from either of the objects.

Object repository1 (English)                            Object repository2 (Spanish/German)
              Link1                                                                           Link1
        (“Click here”)                                                        (“Klicken Sie hier”)

                                               SetOR (“Object Repo2”)
                                                  ClickOnLink (LINK1)

 Object Repository of English language:-

 6

Object Repository of Spanish language:-7

Checks before using SetOR:-

Before using SetOR the following checks/prerequisites should kept in mind:-

  • The hierarchy of both object repositories should be same.
  • Name of Parent object and Child object has to be same.

In Test case SetOR construct is used after open browser:- 8

In Provide Data Value for Data Input Arguments dock able panel, provide path of the Object Repository file (Spanish/German).9

Click on OK button.
Now during execution, the Object Repository will change with the one specified in the Data Input Arguments panel.

So we have seen how using OpKey personal edition which is freely available we can easily test even complex automation scenarios like making work the same script on different languages of the same website.

Advanced Test Parametrization

In part 1 – http://opkey.crestechglobal.com/nblog/?p=35,  of this article we discussed on how we can parameterize OpKey test scripts and how we can iterate the test over a large set of data. Now we will be discussing some advanced aspects of it. In our previous discussion we tested the login and credential validation process of an application. Now we want to test the product-search feature of the same application. We have a text box where we enter search keywords. We hit enter and we are presented with a page full of relevant products. But before we do it we need to login first. So we create a test script as:

//this part does the login
OpenBrowser("internet Explorer", "http://www.yoursite.com/loginpage.php")
TypeTextOnEditBox("txt-box-1", "your-username")
TypeTextOnEditBox("txt-box-2", "password")
ClickAndWait("bttn1")

//here we search
TypeTextAndEnter("txt-box-3", "search-keyword")
VerifyObjectExists("item-count-link")

When executed, this test script opens internet explorer, logs in with provided credentials and searches for a product. We now want to parameterize this. There are a total of three variables – username, password and keyword. We could go with a data repository of three columns but then we will have a slight problem: we have just one (or limited) set of login credentials but fairly large set of keywords. A basic data repository will look like:

-------------------------------
USERNAME | PASSWORD | KEYWORD
-------------------------------
alice   |  111     | movies
bob     |  222     | books
charlie |  333     | gift items
alice   |  111     | shoes
bob     |  222     | novels
charlie |  333     | laptop
alice   |  111     | dell
bob     |  222     | nokia
charlie |  333     | headphone
-------------------------------

Try to bind the columns to their respective parameters in the test case. See part 1 of this post if you need help. Run the test. You will see the test case iterates 9 times.  Every time it logs in with a user credential and performs a search.

One thing that you will find intriguing is the multiple repetition of {alice, bob, charlie} set. Had the keyword set been much larger, as in real practice it would be, the reparation of the username would not look good. Here is the solution – whenever you find yourself in a position when a fixed set of data (here username and password) repeating over other set (keyword), do not actually repeat or copy paste the values. Just leave the cells empty like this:

-------------------------------
USERNAME | PASSWORD | KEYWORD
-------------------------------
alice   |  111     | movies
bob     |  222     | books
charlie |  333     | gift items
        |          | shoes
        |          | novels
        |          | laptop
        |          | dell
        |          | nokia
        |          | headphone
-------------------------------

To try this feature, go to the data repository and delete the redundant cells. You may select the cells and clear them. If you execute the test right now you will see that in fourth iteration OpKey tries to login with blank username and password. This is the default behavior. In the fourth row the username and passwords and empty hence the TypeTextOnEditBox is provided empty. This behavior can be overridden.4

Go back to the test case. Locate the username parameter it would be bound to data repository and the icon next to it will tell you so. We need to redo the binding process. Expand the data repository but do not select the column now, not yet. Rather look to the top of the popup. There you will find tow radio buttons CYCLIC and CONTINOUS with continuous being selected by default. Select the cyclic button and then select the USERNAME column. What we did is that we bound the username column in cyclic fashion. So once the data in the column finishes (after three) iterations, OpKey will automatically cycle to the first element in the set. Do same with password field. Save and run.

To learn more about the iteration mechanism of data repositories see the online documentation on the same.

 

How to parametrize your test scenarios in OpKey

A very frequent scenario in automation is to be able to run your same test case with different data sets; to validate the application behaviour. This is also known as “Parametrization of Test Cases” in automation.

Consider the simple test case of application login. You want to test the application response to right and wrong pairs of username-password. You might also be interested in block-after-three-attempts scenario. We start with a simple test script as

OpenBrowser(“internet Explorer”, “http://www.yoursite.com/loginpage.php”)

TypeTextOnEditBox(“txt-box-1″, “your-username”)

TypeTextOnEditBox(“txt-box-2″, “password”)

ClickAndWait(“bttn1″)

VerifyObjectExists(“logout-link”)

The idea is, if the logout-link exists then we say that the page accepted the given username and password. Depending on the validity of username/password pair we provided, the test either passes or fails. A problem with this approach is that if we need to test with a different username/password pair, we need to alter the script and then rerun it. That will not be feasible if there are say, tens or hundreds of data pairs. We need to parameterize the username and password fields (variables) and feed the data from a table. This is where data repositories come in handy.

A data repository is a simple table which holds the data for one test. There could be many-to-many relationships between test cases and data repositories but for now let there be one data repository per test case. A data repository is a table in row/column fashion. Each column represents a variable/parameterized-data from the test case. In our case we would have two columns USERNAME and PASSWORD. Each row represents one iteration of test case with values taken from the cells in that row. Let us create a data repository as such.

——————–

USERNAME | PASSWORD

——————–

alice   |  111

bob     |  222

charlie |  333

——————–

Go back to test case. Select the username field. Instead of providing static value, go to Data-Repository section. Expand the newly created item. Select the username column. Do same with password field. Select the password field of second TypeTextOnEditBox step. Change the static value to Data-Repository. Expand the data-repository from the drop down. Select the password column. Now execute the test and watch. The whole test will run three times, one with each pair of username password. We say that the test has iterated three times, which was the maximum depth of any column in all the repository columns used in current test case. You can increase iterations by increasing the number of rows. For much complex tests which are heavily parameterized, the number of columns will increase.

So we have seen how we can easily parameterize OpKey test scripts and iterate a test over a large set of test data. In next post we will discuss scenarios when data in one column repeats for data in other columns.

Bridging the Gap between Open Source & Commercial Tools

These opinions are strictly my own based on my own observations and experiences with both kinds of software and trying to understand the dynamics at play in each environment. I’m sure others share similar opinions. Also note that these are sweeping generalities and caricatures, but I think provide a good starting model for critiquing both.
The main Gap between Open Source and commercial tools is licensing. Using the Open Source Edition (under the GPL license) obligates you to share your source code without restrictions with the users of your program. Using the GPL also means you may not demand compensation for or limit subsequent re-use and re-distribution of the source code. You need the commercial license if you want to avoid these obligations.

Open source Functional Tools

The reason many users originally try an open source solution (myself included) is price. An open source functional tool will be significantly cheaper than a commercial functional tool. As with many open source programs, because the code is “open,” the opportunities for customization are also greater than they are for a commercial functional tool. Depending on your functional tool needs, there may very well be an existing open source functional tool that will fulfill your requirements.

The arguments against implementing an open source functional tool are numerous, but are generally tied into one key concern: uncertainty. Product support, documentation, and user training are often subject to the whims of volunteer (read: unaccountable) developers. As a result, there is often no brand name or customer service department to offer assurances or assistance in maintaining functional tool stability and security. Enterprise-level workflow management may therefore be difficult to achieve, and product implementation may take considerably longer than with comparable commercial functional tool products.

Commercial Functional Tools

Buying a commercial functional tool offers a number of distinct advantages, not the least of which is commercial support and well-defined service level agreements. A commercial functional tool may already be ready-built for your needs and will likely be faster to implement than an open source functional tool. Documentation and training for commercial functional tool products are usually significantly stronger than for an open source solution. Your average person also associates a certain degree of safety with commercial software as opposed to open source. If you or your client has the resources to purchase and appropriately license a tool, it can often be the safest bet.

Arguments against buying a commercial functional tool come down to one issue: cost. Commercial functional tool license costs can be prohibitively expensive, and customization/integration expenses can send these prices even higher. Commercial functional tools rarely represent a “budget” solution.

On top of that commercial software needs to demonstrate that they have solved a hard problem that no one else has solved or make competitors solutions to problems seem hackish. So the marketing folks will use words like “You want to solve the problem the right way, don’t you?” which often means “The hard way that only we know how to do.” A corollary to that is if a problem is really hard and you have solved it or can convince people you have solved it, make sure everyone knows that and make sure everyone thinks they have the same problem. That actually holds true for both commercial and open source but is generally easier to pull off for commercial software.

Comparison Parameters

Tools => Record and Play Back => Language support => Application support
Watir => Support with WET => Ruby => Web Based Application
Sahi => Inherently Supported => JavaScript => Web Based Application
AutoIT => Inherently Supported => BASIC-like syntax => Windows Application
QTP => Supported => VB Script,Java script => Windows/Web Application
RFT => Supported => Java,HTML,VB.NET => Windows/Web Application

After Thoughts

In the end, I would just like to say that it’s a trade-off between how uncertain is the uncertainty of a free Open Source solution with how costly is the cost of a commercial reliable solution. Many companies are trying to bridge the gap between the two by providing software with the reliability and user friendliness of a commercial solution for an open source tool price.

Opkey is a great option, if you are that someone needing the Bridge

Happy Opkeying.

How to configure Selenium as a Plugin with OpKey for Execution

OpKey is not just a one letter word for all those who are not aware of its significance and scope in current market. But in actual, it’s an amalgamation of several tools which are used as plugins for test automation. OpKey is a complete product to suffice all your test automation needs. No wonder it is also known as “The Smartest Automation Framework”.

OpKey uses tools, such as Selenium, QTP, RFT, Sikuli and Robotium as plugins. Out of these plugins, OpKey personal edition uses only a single plugin, i.e., Selenium for test automation. Selenium is an open source tool that is used to test Web applications. Let’s look at the key functionalities of Selenium test automation tool:

  • It can be customized as per the requirements.
  • It is an appropriate tool for performing browser compatibility and functional testing.
  • It is available for free; and most popular open source tool for automation.
  • It has wide support for various OS; languages.
  • It has a very strong and active support community.

This tool has several components and we can use these components either in isolation or in combination to test different Web applications. One such component is Selenium Remote Control (RC), which has the capability to execute test cases or a suite containing test cases on different browsers. Since OpKey personal edition uses Selenium as its plugin, configuring selenium is necessary prior to any suite execution.

In OpKey, you can add test cases containing keywords to a Suite file for execution. But, to execute the suite file, you need to make sure that selenium is configured as plugin. Otherwise, a dialog box will prompt you to configure the plugin when you proceed to execute a suite. For configuring Selenium as plugin, you only need to follow four simple steps:

  • Step 1: Provide Selenium RC Server Path- Specifying the location where RC Server has been placed is important to support automatic launching of browsers for suite execution. If this path is not provided, then it would not be possible for OpKey to execute suites.
  • Step 2: Provide Host Name- After specifying RC Server path, you need to specify the name of the host on which RC server will run.
  • Step 3: Provide Port Number- Passing the Port number on which you want to invoke the Selenium RC server is also essential; therefore, make sure that port number is entered correctly.
  • Step 4: Provide Command Line Arguments- If you require any command line arguments at the time of server invocation, then you need to pass them when you configure selenium.

In OpKey Personal Edition, you can easily configure Selenium Plugin by navigating to Tools menu and selecting Plugin Settings sub-menu from the drop-down list that appears. Once you click this submenu, a Plugin Settings window will open up. 3Plugin Setting Window in OpKey

In the opened window, you can specify RC Server path, Host name, Port number and Command line arguments. After specifying the plugin configuration information, you are required to click Save button to save configured plugin settings.

Now, you can easily run any of your suite files with Opkey using selenium.

 

How to use IF condition and FOR loop while authoring your test cases in OpKey

Usually while automating a test scenario we come across situations where we need to use of our programming skill of knowing how to use an if condition; a for loop. Such advance test scenarios are not generated by simple record – replay; and need skilled resources to create such scripts.

OpKey next gen rich keyword driven interface allows such programming constructs available in form of simple keywords which can be used very easily while authoring your test scenarios. In OpKey Control Flow Constructs are used to handle conditional operations (IF, ELSE, ENDIF) and Iteration-related operations (FOR, NEXT).

Under Test Case we can use multiple combination of Control Flow Constructs like Simple IF-ELSE Condition, Simple FOR-NEXT loop, Nested IF condition, Nested FOR loop, IF contains FOR loop and FOR which contain IF Condition with Pre defined Keyword, User defined keywords and System Keywords.

We can create and Save IF and FOR condition in a Test Case without ENDIF and NEXT respectively but at execution level it may give unexpected output or output which does not match with actual result. So it is necessary to use ENDIF and NEXT if we use IF and FOR Constructs for the Correct output.

Let’s see some combination example:-

IF                                                                          FOR                                                                         FOR

Keyword1                                                             IF                                                                                             Keyword1

Keyword2                                                                Keyword1                                                            Keyword2

Keyword3                                                             ELSE                                                                                    FOR

ELSE                                                                       Keyword2                                                                           Keyword3

    Keyword4                                                                Keyword3                                                                           Keyword4

    Keyword5                                                             ENDIF                                                                                 NEXT

ENDIF                                                                     NEXT                                                                       NEXT

Simple IF Condition                                             FOR contain IF condition                                    Nested FOR loop

Let’s take some real word scenario: - If user wants to create a Test Case in which user want to check the “IF” condition and if the condition is true then it Login the Site otherwise it go to Registration Link.

In this case we have to use FOR and IF condition combination.2How to implement this Scenario in OpKey: - 

Keyword Object Input Output
Open Browser “Mozilla Firefox”,”www.gmail.com”
FOR 2 Op1
    IF Op1”=”1”
TypeTextInEditBox Username Crestech
TypeTextInEditBox Password 123
    ELSE
       Click Registration Link
       TypeTextInEditBox First Name CresTech
       TypeTextInEditBox Last Name Noida
       ——– ——- ——–
    ENDIF
NEXT

 

So; even such complex programming scenarios can be easily automated using Opkey rich next gen keyword driven interface. And even having no prior programming experience you can easily automate such complex test scenarios.

Use of Output Values in OpKey Using Referencing

Reference is a relation between objects in which one object Output is used as an input to another object.

  •  The first object in this relation is said to refer to the second object.
  • The second object (the one to which the first object refers) is called the referent of the first object.

In OpKey referencing is done between two steps. These steps may be Pre defined Keywords, User defined keyword, System Keywords, Control Flow constructs and Function Library. Functional Library is not available in the OpKey Personal Edition but in the Team and BPT Edition we can call or add Function Library under Test Cases.

In OpKey personal Edition we use Pre defined Keywords, User defined keyword, System Keywords and Control Flow constructs for referencing. When we use One Step Output as an Input in the second step then this is called as Referencing. We cannot use first step output in the second step if First step Output data type and second step input data type  mismatch i.e. If Second Step input data type is integer and First step Output is String data type so we cannot use first step output in the second step.

  • 1Let’s take some real word scenario: – User created a test case in which a query fetch value from Database in the first step and the output of this query is implemented as an input in the second step.  User can use this output further in multiple steps.

    How to implement this Scenario in OpKey: –

    1. In Test case add a step and define its output variable in Step output section on right panel.
    2. Add second step in which you want to use the output of first step.
    3. Select output tab in Provide Data Value for Data Input Argument section on right panel.
    4. Choose the output variable that is defined for first step.
    5. Save the Test case and Execute.


Keyword Input Output
FetchColumnCountFromRecordSet Select count(*) from Employee Count
VerifyValueInRecordSet Count, 5

What is Progressive Automation?

Summary

The classical approach of automation only focused on test scripts in-turn, giving rise to various challenges. Business process approach propagates component driven design and development of automation. This not only enables collaborative working within team but also helps organizations achieve Progressive Automation. This blog covers the meaning of progressive automation, a paradigm shift into automation approach and the conclusion.

What is Progressive Automation

Progressive automation is one of the methods of automation technique where, test modules are tested one after the other. In progressive automation, automated test scripts are written along with the development code, for faster testing and identification of problems along with quicker fixes. The scripts are essentially written to test new software. A progressive automation suite takes only two or three days to run but hundreds of test cases can be executed simultaneously where it would have taken weeks to run manual tests. It also facilitates in spotting the negative impacts of programming or updates on existing system much earlier in the development cycle. This facility allows organizations to shorten the time cycle for testing and increasing coverage of testing in terms of requirements. Fortunately with progressive automation, the paradigm shift is taking place, to some extent.

How is Progressive Automation different from Regressive Testing

Progressive automation is a strategy. It enhances traditional regressive testing wherein, new code is tested near the end of a project to locate errors. Though, progressive automation is not regression automation as it is totally different from it. In progressive automation, automated test cases are written to validate new functionality, whereas in regressive automation, validation is made to make sure that the existing functionality does not break the flow with any change. Progressive automation allows gaining high levels of ROI within a project whereas typical regressive automation suites are built at the end of a project with the hope to use them again in next project. The cycle time for testing is shortened and testing coverage is increased in terms of requirements in progressive automation.

How is Progressive Automation different from other methods of Testing

Progressive automation unlike other methods of testing automates test scripts written along with the development code, for faster testing and identification of problems and quicker fixes. The scripts are essentially written to test new software. A progressive automation suite takes only two or three days to run but hundreds of test cases can be executed simultaneously where it would have taken weeks to run manual tests. It also facilitates in spotting the negative impacts of programming or updates on existing system much earlier in the development cycle. This facility allows organizations to shorten the time cycle for testing and increase coverage of testing in terms of requirements. It is a strategy enhancing traditional regressive testing wherein, new code is tested near the end of a project to locate errors.

Conclusion

The first steps towards automated software testing in the history were taken almost 30years ago. Since, software development industry has seen some fundamental innovations but due to the obstruction caused by maintenance problem like inconsistent delivery and changing IT complexity etc, test automation is still in jeopardy. Therefore, with the help of progressive automation, issues related to inconsistent delivery and changing IT complexity can be resolved making the test process more effective.

What is Open Source?

Summary

Technology and Internet revolution have engulfed the world making it a smaller and flatter place. Global modernization have made people around the world closer to one another, but the people worldwide are now realizing that just being connected is not enough. Fortunately, a new revolution has begun: one that holds significant potential. The world is becoming smatter day by day. World is now moving towards an on-line mode of operation where most of the activities are performed through services accessed online. The high quality of service is guaranteed by the service providers as users rely on these services to carry out their daily tasks. Since, the planet is moving towards an on-line mode of operation, the standards for the quality of distributed system have been raised to a very high level. This blog covers:

  • Definition of open source.
  • Open source technology.
  • Working of this technology.

What is Open Source

The principle behind open source originated in the software industry in the late 1990s. The term open source refers to the program which is freely available for public use. The source code is created as a collaborative effort. In this effort, developers around the world can improve upon the code and share changes within the community. By using open source, the end users can directly interact with the source and can modify it to suit their wish. This encourages the users to constantly develop and innovate, while also creating a community of shared information. Most of the companies producing open source products rely on user’s innovations to expand features. This will identify and fix potential weak point and most of the companies actively encourage modification of their products.

Why the world is moving towards Open Source software

The open source term is generally used in context to the software. Open source evolved in the technical community as a response to the corporations owning proprietary software. The open source software’s are not anymore restricted to computer geeks. Because of internet, the software is available to the world. The open source movement has gained its momentum and is still gaining. The applications are deployed in many education and research sectors, public or professional administration and private users are using them as well. These software’s can be upgraded through internet which is nothing more than the removal of some components and installation of more recent ones. Upgrading process is same as that of installation of a single package. The best of the systems are open sourced. A very good example of this kind of system is Linux operating system which is considered to be the best in the world due to its robust open source solution.

The software systems deployed these days are made up with complex entities that coexist in the same environment. The new operating systems provide basic infrastructure for organizing and managing the components that are considered the basic building blocks of complex systems. The very foundation of distributed system is due to this type of infrastructure. The world is now breaking free from software lock-ins. By adopting a key named Open Source and Standards, the living and work standards of people can be improved. Open source in production and development means promoting free distribution and access to an end product’s implementation. The term open source gained hold with the rise of internet. Opening of a source code allows a wide range of production models, communication paths and interactive communities.

How does Open Source work

Open source provides a platform for the new developers to develop and produce software either for release as a new incarnation of the software, so that others can use it or can support in-house development.

An issue regarding copyrights assigned to the original software and modifications made to it has come up repeatedly in open source. Most of the open source license agreements now a day’s outline that the ownership of software can never transfer to anyone who modifies the software. This type of agreements make impossible for a developer to take open source software, modify it and then sell it. Money made from open source software comes in the form of support for software technology, its additions, add-ons and its modifications.

Most of the open source software’s can be downloaded for free, but license remains with the original creator of the software only. That license is not transferred to anyone regardless of any modifications, improvements, or add-ons made to open source software. Although, the software is free to download, but is not free in the sense that the end user can do whatever they want to do with it including selling it. The open source technology has initiated a culture of open source among programmers and developers who believe in the open source philosophy.

Conclusion

Open source is the buzzword in IT industry. It has proven its worth in the industry to be every bit as secure as the closed ones are. In spite of its loop holes, people still prefer to use open source software’s due to its popularity then the closed ones. The open source technology gives budding developers a chance to show their talents and gives many companies a chance to use those software’s for free.

What is Business Process Testing?

Summary

So far, classical approach of Record and Program Style Script Driven methodology for automation implementation has been used. According to this approach, the focus was on specific user interfaces and corresponding clubbing of functionalities to create Test scripts. These Test scripts were then combined to create test suites. But, apart from test driven automation it came with the drawback such as, reusability and maintainability of test suites, lack of business focus while automation and a challenge of making non-technical users incline towards automation. With all this in mind, Business Process Testing (BPT) came into picture, since; it supports reusability in testing environment. This blog explores following issues in-case of reusability.

  • Increasing reusability using BPT framework.
  • Using BPT framework for OpKey testing.
  • Reducing rework by using BPT framework.

What is Business Process Testing

With the perspective discussed above, OpKey framework allows business testers to move for an alternative approach called Business Process Testing, henceforth referred to as BPT. It is based on the philosophy that any enterprise application involves a number of business processes to be tested. This approach is designed for the participation of business users. Scripts are dependent on each other and combinations of scripts are used to create Test suite to test specific part of application. The BPT framework focuses on Component Driven approach expediting automation implementation and reducing maintenance effort significantly. It happens because the automation implementation starts even before application is ready and the main business focus is on testing.

The reusability of automation steps written for test cases is a very hard term to achieve. By using BPT framework early in the development cycle, reusability can be achieved. It consists of:

  • Reusable business components
  • Business components converted into Business process test

Business components are reusable units that perform a specific task in business process. Wherein, business process is a compilation of related activities performed to achieve task as requested by the customer. If any change needs to be done, then making it in only the business component would do. The explanation on this part will be clear by looking at the diagram of component based design in context to a Sales application. It shows three business flows which in turn are combination of business components (that is, “Create New Quote” is a business component)

Note: Business components common to different business flows are marked in same color. For example “Save Quote” component is being used in all three business flows at different places.

Business Process Test on the other hand is a scenario comprising of business components. It is based on the philosophy that any enterprise application involves a number of business processes to be tested. BPT supports new methodology for testing, by combining various plug-in tools like QTP, Selenium, etc.

BPT and OpKey

OpKey supports BPT for allowing non-technical Subject Matter Experts to quickly build data-drive and document tests at one place. It uses reusable component based approach for test design in turn accelerating test design process. The maintenance effort is reduced so much so that a change in the component gets reflected in all the flows using the component. Before an application is delivered to QA, OpKey allows test automation to start much earlier in the development lifecycle. Its component based approach expedites automation implementation in turn reducing maintenance effort significantly. BPT in OpKey consists of three unique entities, namely application component, business component and business flow.

BPT approach is specifically designed for the participation of non automation users. BPT starts automation implementation even before the application is ready and its business focus is on testing only. BPT approach allows its users to instigate quality assurance efforts earlier in the application development lifecycle. Since, the testing approach adopted by OpKey BPT is based on Keyword driving testing, the automation of tests can occur without the need for recording application flows from a stable application.

Making BPT work

The testing workflow of BPT comprises of a serial flow of business components. It is based on the foundations of creation, implementation and running of business components in BPT by using:

  • Quality Center Business Components
  • Test Plan modules
  • Test Lab modules

The Business Component (BC) module enables to create and manage reusable BCs. In a Test Plan module, the components can be dragged and dropped into BPTs and the components can also be debugged. While, Test Lab modules are used to run BPTs and view results.

The reusability of business components for designing tests can be achieved through BPT. This approach is used to reduce test maintenance drastically and improve efficiency of creating tests. Once the manual test cases are designed in OpKey BPT, those test cases are easy to automate. The OpKey BPT takes data from test flows for developing tests. Rows of data can be created in a table for triggering test conditions during the execution of a flow. BPT is role-based, allowing non-technical Subject Matter Experts (SMEs) to work on tests along with the Administrator and Automation Engineers, all work together and in parallel. BPT allows SMEs to define test flows through an easy to use by telling what steps to take and which data to use. These test cases are then executed manually through QC with hardly any additional efforts. They are responsible for the automation of components, creation of various repositories, business flows etc.

An Administrator performs the responsibility of creating project hierarchy, configuring the setting at tool level and project level. The Automation Engineers create application areas and the object repository, library files, and recovery scenarios associated with these application areas using a testing tool such as QuickTest Professional or Selenium. The Automation Engineer can also assist with the debugging process after the Subject Matter Expert creates automated business process tests.

Target Market

Target markets for BPT include customers using OpKey for reducing their testing efforts, customers who are looking into exploring various automation testing frameworks and customers wanting to use BPT framework.

Conclusion

The ongoing maintenance and rework cost is reduced when a component can be reused for both manual and automation projects with BPT. Its use will also be higher for the projects in which regression tests are to be automated, in turn reducing efforts spent on automation scripting drastically.

Agile Testing Challenges: Inadequate Test Coverage

Nowadays, the trend in IT industry is to meet the targets, quality and customer satisfaction in a limited time frame. Irrespective of the methodology and technology being followed by Software Developers, the prime focus of this industry has been and will always be on Software Testing. Though, testing is a part of business scenario, it still changes with continuous integration and changing requirements. This is due to the fact that the business scenario is different from what it used to be years ago. Due to this change, critical tests for any requirement can be easily missed by linking tests with user stories.

The biggest challenge faced in agile testing is the inadequate test coverage. In order to take better insight on test coverage and analyzing specific metric to identify traceability, test coverage is usually missed. Before covering test adequately, clear understanding of the feature being delivered in the release is a must. A clear understanding about the working of that feature is important that is, how it works, its constraints, validations and functions. The features are then build based upon the user stories. The second major cause of inadequate test coverage could be due to unpredictable change in the code.

Testing on timely basis increases the feedback which drives the success of many agile projects. But, in order to be agile, testing team should respond to the changing requirements quickly, efficiently and effectively. To overcome test coverage problem, the modules that were changed needs to be analyzed for ensuring that all the changed codes are properly tested. In other words, a product tested with agile, delivers software faster and with high quality if the unique challenges faced are understood properly.

 

                Approach to Agile Automation

Going through usual standard SDLC Models like Waterfall, V&V etc. seems very impractical when an application is developed as per user needs as these models are most suitable for stable and non-volatile applications. With changing trend in IT industry, the applications are not stable anymore and are volatile in nature. Because of this, software vendors have come up with a new strategy to save time, resource, and at the same time deliver a reliable product meeting user requirements. A new strategy called Agile Automation Testing is adopted to overcome the issues of dynamically changing environment.

Agile in its simple language denotes doing something rapidly. Therefore, Agile Automation Testing refers to validating client requirements and making applications user friendly. The testing on Agile environment starts with the reporting of bugs once a build is out. Emphasis in this kind of testing is given to the delivered product rather than short time frame. The automation of test cases can be done by applying agile values and principles. The Agile approach to automation is based on following key principles:

  1. Simple: The tools selected to automate test cases should be simple to use as complex tools take more time to learn the tool then the time to create test cases.
  2. Maintenance: Unprepared automated test scripts take a lot of time to maintain. The long test cases should be divided into multiple smaller test cases so that they are easy to script and maintain.
  3. Joint effort: All testers in a team should help each other to find quick solution for the problem faced as the knowledge of one person can help solve the problem of other team member.
  4. Short Iterations: As entire project is divided into various modules, the priorities are assigned depending upon user requirements. Each module is allotted a specific time frame and development on the important module then starts to make sure that a standalone working module is ready at the end of a time frame. Short iterations help to choose the right tool for automation such as while automating functional test cases, WATIR can be used.
  5. Knowledge of Tools: To automate a test case, knowledge regarding all automation tools is very important to help choose a tool which best suits the requirement. The requirement for a tool depends upon the size of project, time allocated to the project or cost of the project. Therefore, all the team members should be well versed with the tool being used.