First Test | Bondar Academy
Course: Mastering testRigor
Module: Introduction
Instructor: Artem Bondar
Lesson Summary
In this lesson, we explore the test application for our course and create our first test using Test Trigger . Here’s a summary of the key points covered: Test Application Overview We will use the website playground.bonderacademy.com for practice exercises, which includes various UI elements such as: Sliders Charts Forms (including checkboxes and radio buttons) Date pickers Dialog boxes and toaster notifications Drag and drop features Setting Up the Test Suite To create a new test suite: Name the suite (e.g., Playground QA ). Select desktop web testing . Provide the base URL: playground.bonderacademy.com . Skip username and password fields. Select Chrome as the browser. Set the number of AI-generated test cases to zero . Configuration Settings Adjust settings for optimal performance: Change maximum wait timeout from 30 seconds to 5 seconds . Set screen resolution to Full HD (1920x1080). Creating and Running the First Test Case To automate a scenario: Open the home page. Click on the Forms menu item. Expand the menu and select Form Layouts . Input username and email , then click Submit . Utilize visible elements and unique identifiers for interactions. Test Trigger captures screenshots at each step for review. In summary, Test Trigger allows for simple scripting through human-readable prompts, facilitating efficient test automation. Future lessons will delve into nuances for reliable prompt creation.
Video Transcript
All right, in this lesson, I will show you the test application that we're gonna use for this course, and also we will write a first test trigger test. So you will see the test trigger in action, all right, let's get into it. So in the Chrome browser, open a new tab, and type playground.bonderacademy.com. And hit Enter, and this is the website that we're gonna use for practice exercises. So this website is technically just a list of different types of UI elements, and we will practice all of those. So for example, we have a slider over here, we have a nice chart right here, you can switch between different modes, you can activate the temperature over here, switch on the buttons, you see the changes of the values. Then we have different forms over here to submit inline form and other types of forms with the checkboxes, with the radio buttons right here. We have a date picker, we can select different dates and see how the date picker works. In the models and overlays, we have different types of dialog boxes, we will automate those, or for example, a toaster page. See, the toaster shows up over here. In extra components, we have the drag and drop feature, so we will automate this kind of stuff. And we will practice different interactions with different types of elements with a test trigger using this application. So let's set up the new test suite for the Playground application. And I will call it Playground QA, for example. It will be a desktop web testing, then we need to provide a URL. Let me copy a base URL right here, playground.ponderacademy.com. For the username and password, we don't need anything because our application does not have any authorization credentials right here, so we just skip it. Operating system, only Ubuntu is available because we use a free test trigger account, Chrome browser, Chrome or Firefox available, we will use Chrome. Number of test cases to generate using AI, I will select zero. And later in the course, we will cover the generative AI feature of the test trigger. But for now, we don't want to generate any test cases automatically, just zero. And that's it, click the button, Create Test Suite. So that test suite is created, let me make it a little bit smaller. All right, and this is the area of the test rigor dashboard. First of all, let's make a quick configuration in the settings to improve a little bit the performance of the framework. So on the left over here, scroll to the Settings, click on the Settings. And here we need to make a couple of updates. So first of all, go to Speed Optimizations right here. And the maximum wait timeout change from 30 seconds to 5 seconds. So what the settings means is how long test trigger will wait for the particular action on the page. For example, if your test is about to fail, so test trigger will wait up to 30 seconds to interact with that web element. And if it's not gonna work, the test will fail. Our application pretty fast, so we don't need this longer wait timeout to wait for the elements, for example, be available, visible, clickable, and so on. So five seconds will be just enough for us. So if the test will fail, it will fail earlier and we can debug it faster, something like this. And the second settings that we need to do is go to Advanced over here, scroll down, and we need to change the resolution from this 1024 to Full HD. 1920 to 1080, like this. So our application under test will be more incompatible mode with the responsive design. So all buttons will be clickable, there will not be overlaps of web elements, and so on. So and that's it, so click Save, and we're going back to the test cases. So right now, let's create our first test case and automate the first scenario. So click Add the test case and provide the name of the test case. For example, it will be first test, something like this. And here in the test case body, line by line, you write your prompts with the steps that you want to be executed in the test case. So for example, let's go back to our application, and let's say that we want to automate this scenario. So first we open the home page, then we click on the Forms menu item, then the menu item is expanded, then we click on the Form Layouts. And then in this first form, we want to type the username, then email, and click Submit button. So let's automate this scenario with Test Trigger. So first of all, I want to click on the menu item Forms. And one of the best practices of Test Trigger, which is a core best practice of Test Trigger, is to use the visible elements on the page. So when you want to select any elements or interact with any elements, you need to use something what is visible to the user. And in our example, the Forms and Form Layouts text is the text visible to the user, it is unique text on the page. And we interact with basically just this text, clicking on this and doing whatever operations we need. So first of all, select Forms menu item, and I type, just click and provide Forms, like this. Then the next step, click on the second menu item, which is under it, is Form Layouts, like this. So when we are on Form Layouts page, then we need to type into this input field. How are we gonna do this in Test Trigger? We need to unique identifier, some unique identifier for the page, and then just write the prompt based on that. Unique identifier for this entire page is this placeholder. So Jane Doe is visible to the user. It is unique, and we can use it as identifier where we want to type specific text. So I type Enter, and then Artem Bonder, Into, and the placeholder of this input field, which is Jane Doe, Jane Doe, that's it. Then I need to type the email in this input field. But this email placeholder is not unique, because you see it's over here and over here. And if we scroll down, it's also right here. So we cannot use just email, but we can use still a Jane Doe unique text, the placeholder for the first input field, as a relative element for the input field email. This is how we can do it. And I type Enter, for example, Artem at test.com, some dummy email, Into email. But where this email is located is to the right of Jane Doe, like this. And the last step, we need to click on Submit button. And again, Submit button, the text Submit is not unique for the page. So here is Submit, and here is Submit, and here is Submit. But if we will use Jane Doe still as our unique identifier for the entire page, we can click Submit to the right of Jane Doe. And this is what literally we type. Click Submit to the right of Jane Doe, like this, and let's run this. Add and run, and TestRigger is setting up our test case for the execution. We need to wait a little bit, and it is running. And that's it, test was executed. And look, when TestRigger runs your test, it, for every step, it creates a series of the screenshots. So you have a screenshot before the action, the screenshot during the action, and screenshot after the action is completed. And by reviewing the screenshots, you can tell what's actually happened during your test case. So let's review those screenshots one by one. So this is the first screenshot. So first of all, we open the application. The next step, we clicked on the forms. And you can see on the screenshot, it is highlighted area of the entire element that was selected, and a little dot in the center. So it means that the click was performed into this section. Then the menu was expanded, and then the next step, we selected Form Layouts menu item. The next Form Layouts was opened. And the next step, we can see Artem Bondar email was typed. And also you can see the Submit was highlighted that is also selected as button, so all three steps were performed successfully. So that's basically the underlying idea how TestRigger works, how it interact with the elements. You just provide the human readable prompts, and that way interact with the web page automating your test cases. This is how it works. Let me also make a quick overview of the interface. So for every test case, you have this expandable menu. So all your test cases will be stacked right here on the dashboard. And for each test case, here's what you can do. So if you want quickly update your test cases with some steps, quick edit and you will see this editable pop up when you can change and modify your step, update and retest automatically will rerun your test. Then edit test case, if you click on that button, this will open the separate page for editing your test case with a history of test execution. So it's up to you, do you like interface number one or number two? You can edit the test right here, save and retest it and see the history of executions or just make a quick edit, it's just up to you. Retest, just simply rerun the test, copy the test case, we'll copy the test steps. Delete is delete, a view steps is just view the steps without possibility to edit those steps if you need that. So that's pretty much it, so simple interface. And the scripting in the test rigger seems quite simple, right? So you just write the prompts and it works. And it is, actually is, but there are some nuances. How to see the page, interact with the page, how to find a correct relation between the elements, how to find the unique element that can be used. Sometimes you even can use invisible elements to interact with the web page. And all those little details and nuances we will cover during this course. So your prompts will be reliable, your prompts will test what you want to test. And you can comfortably use this framework to automate your test case quickly. All right, so see you in the next lesson.