Turn your manual testers into automation experts! Request a DemoStart testRigor Free

Tips & Tricks – Automated Form Testing

In this session we will show you how to test all types of forms. There is no reliance on implementation so you can use testRigor to test any type of form. Our approach is the same as a human would view them. We will show examples of seamless testing of custom drop-downs, custom checkboxes and radio buttons.

Artem Golubev: Hello everyone. Today we will be talking about automating testing of the forms;  there are several challenges with automating testing forms which you would  usually encounter. So, first of all, let me walk you through the specific features that testRigor has to simplify and what kind of challenges our customers usually run into before using testRigor. So this is an example on Safeway.com. So basically, some forms are elementary, for example, searching for products from a user’s perspective. However, if you try to rely on the idea, that might change. 

TestRigor allows you to enter the data stably, depending on how it looks from the end-users perspective. In this case, we can say things like entering product to search products. Moreover, testRigor can also automatically associate whatever looks like the label from a user’s perspective. This is the input such that you can say things like enter test into first name and based on how it looks from a user’s perspective. Here is where it might be no technical association between first name tags and this input below. However, if you see an instruction enter test in the first name, you, as a human, intuitively understand that we were talking about this input below or rather than trying to figure out what to do with this text, but you associate this with test automatically, and this is what testRigor allows you to do easily. So you can do things like enter test in the first name and the last name. Finally, the next thing that testRigor can do for you is simplify working with their dropdowns, and another challenge working with dropdowns sometimes is that it is not always dropdown as instructed by HTML. In HTML the dropdowns are usually select tags option tags. However, in the modern application, frequently, there is just something that looks like a dropdown from a user’s perspective. However, it is not a dropdown. In this case, it’s straightforward to deal with on TestRigor. In the majority of the cases, you will be able to say things like enter April into a month or something like that in a birthday section, or our AI wouldn’t be able to detect that this is a dropdown when you can click on a month and click on an April. So we are making it very easy. So let’s practice this with the Safeway.com application. TestRigor also has a way to help you to express the steps in English that are not perfect, of course. But it will help you to speed up you are creating your first test app; after that, it will be faster to use the rules themselves instead of using this recording. Okay, so let’s sign up.

Connie Lund: Can you share your screen?

Artem Golubev: All right, let’s start again. I apologize that I wasn’t sharing the screen. Let’s start the application and start a new recording. So with this, testRigor will be able to help you to formulate the steps. Then let’s click on sign up and sign in. I want to use something we could use for testing here, and let’s sign in. Let’s close this and click on Account, and I want to go to Account settings; as you can see, now it looks different. Let’s click add for the birthday, and select on this particular case it will be [unintelligible]. Let’s select June as the month. I’ve left eight as the day, and let’s click save, and then we want to validate it is a fixed date.

Are they present on the field? Let’s stop the recording. As you can see here, it recorded the steps here for us. So this is what I was talking about; you can select June from the months and eight from day, click save, and then we can do the validation. And we pick it off. So once again, often, the challenge, as I was mentioning, is, in fact, that, like you should be able to deal with his custom dropdowns, custom checkboxes, nos kind of stuff, which testRigor helps you to automatically identify and use the same language you want to use in dropdowns. Moreover, testRigor uses AI and machine learning to detect various classifiers of dropdowns. It is easy to express everything purely from an end user’s perspective.

Let’s get into our project and see how our test is executing. This is our test, and here is an example we are going through. Let’s click on sign up and sign in. But in this case, the test will fail because there is no more info on the birthday. But hopefully, it illustrates the point. So let me select another example here. This is the test page, and that’s an interesting example here. Can we isolate selecting those checkboxes? So the thing is that you might have checkboxes, like in many places on the screen. Often, you need to select the ones related to, let’s say, gender and are in certain sections. So let’s imagine where multiple sections and multiple options are. Where we can select males and females.

In testRigor, you can specify exactly what you want to do here. Let’s create a new test suit for this application and select a female for this gender in this section. Create this and make it a Web Test. And the way you would do it is you can express it in the way you would say in English, and you would be able to say click on female or the right of gender or click on female below automation practice and on the right of gender.  Let’s do exactly that. This indicator has a section on the nature of flow because it’s below on the right.

Let’s kick it off. So basically, as you remember, the way that testRigor works is it starts a web application. Like if you select some things to test on this case, Ubuntu or Chrome. Starts Ubuntu machine open chrome browser and loads the URL you specified when you created the test suits. And wait until the page loads and when it starts to execute, steps simulating how a human will run those steps. So as you can see here, it highlighted females because we were able to detect the section.

So we’ve got a section, and it got more specific things like gender and found a female on the right of gender. So we were able to click that. All right. And obviously they have a bug in here, because it doesn’t execute. In this particular case, there is an issue that this female is not associated with the radio button. So we would need to specifically fix that and instead of clicking on female, which doesn’t do anything. We’ll have to click on female, and then you still specify where this female is. You can check that; it will be associated automatically; you don’t need to do anything. So you always keep expressing everything purely from the end user’s perspective. Okay, so I guess this is it for a simple form. Working with forms examples. So as I mentioned, as soon as you can express something in English from an end user’s perspective, testRigor will be able to execute it for you. And let’s open up for questions.

Connie Lund: So one question is, can I fill in a form, submit it, and verify that the email was sent in one test?

Artem Golubev: Yes, you can. We have an example. Give me a second I’ll pull it up. So testRigor supports an actual test to be able to sign up for customers, and we have some examples. Sorry, and the part of the signup process frequently is that you need to verify the email and get data from the email because the email will contain some link or registration code you will need to use. Give me one second. Let me share my screen again.

This is an example of Twitter sign-ups where you go through the registration flow you enter many data into forms, as you can see here, and then basically, the last steps are when you sign up. It will send you an email, and we expect a verification code from your email. So with testRigor, if you generate a unique email using testRigors’ command when and save it, let’s say a new email, and you will be able to say hey, check that email and we will render it for you like a page. And you’ll be able to use the same commands you would usually use with testRigor to work with the carrier. 

You can do validations, or in this particular example, we’ll grab a text below the verification code. Save it as a code and switches back, and we entered our Stored Value code into the verification code and clicked Next. So obviously…Like you can also continue if you don’t want to continue. Obviously, through registration button, but you can continue as you can imagine and finish the registration flow in this case for Twitter. And the point being is that you should be able to use it via emails and sometimes text messages to complete your signup flow. And testRigor supports various use cases out of the box. TestRigor runs its own testing email server so that you can send and receive emails if you use a particular domain. It’s all in the documentation. And you will be able to render those emails. The end user would order to extract the data and sounds forth to complete the four periods, let’s say email or text message.

Connie Lund: The last question is whether many automation tools struggle with dynamically created forms. For example, is this the same for testRigor?

Artem Golubev: No, it is not. There are two things that I think could go wrong here specifically. One is the fact that there are no unique stable identifiers for the inputs here, and that, as we discussed, is addressed by the fact that testRigor does not rely on details of implementation or how those inputs are implemented and outlined. And how it depends on how it looks from the end-user. You can use whatever looks like labels or placeholders or anything else. Somehow, if you have a way of expressing yourself in English. You may have to find elements on the screen. You will be able to do that with testRigor, and this is how to execute it and find it for you and be able to work. This is one. And as an example, I think what the question means here is the form is chain being changed dynamically as we go. And a typical example of that is in this example, if you select a month here, and you’ll be able to choose a day because other months contain a different number of days.

Another prevalent example is after you select the country, and if the country is the United States, you will be able to see another dropdown, which is a straight dropdown that is otherwise not visible. Again, testRigor will be able to process efficiently, so express the same be the select United States from the country and then select California from the state, and it will just work as you would expect because yet again, in testRigor, you were just writing what needs to be done for end-users the same way you would be writing a test case for a manual tester. So testRigor will emulate how the manual tester has worked, and as soon as you have selected the United States as a country in a dropdown, then the state dropdown will appear, and therefore, testRigor will be able to proceed. And, of course, it will automatically wait until his standard is done and appear as soon as it seems, it will continue.

Connie Lund: Right, excellent. So that’s the end of this session for today. Next Wednesday will be testing drag and drop functionality. So we hope you’ll join us then. Thank you.

Artem Golubev: Thank you.