In this chapter, we will cover the basics of test case creation using simple English. We will be explaining this with the same test case that was demonstrated in chapter 3 - Testsigma Sample Application
Some of the concepts we use in this chapter are already introduced in previous chapters. So, if you have not gone through “Preconditions of working with Testsigma”, “Install Chrome Extension”, “Testsigma Sample Application”, “Create a Project” and “Create UI identifiers” yet, please go through them now and come back to this chapter.
We’d expect that you already have an account with Testsigma. Also, you should have created a new project in your account. That will help us explain the steps better and for you to understand them much better.
Now, let’s dive in to create a new test case!
Once you log into the tool, you will see a project selected on the Dashboard top left corner. If the sample project you had previously created is displayed there, you can skip to the next step.
Otherwise, create a new project from there by clicking on Create new Project. This section is also highlighted in the screenshot below:
After a project is selected, we can create a test case.
I - Add a Test Case
1. First of all, navigate to Test Development section from the Navigation bar(left-hand side). It will take us directly to the Test Cases page as shown below:
2. To create a test case, click on the button with “+ Test Case” on top of the page as highlighted below:
3. The next page will ask you to install the Testsigma Chrome extension if you have not done that already. To install the Testsigma chrome extension, check Chapter 4
4. Once the Testsigma Chrome extension is installed, the ‘Create Test Case’ page appears similar to the screenshot below:
5. Fill in the Name and Description, and click on the ‘Create’ button at the top right corner to create the Test Case.
II - Add Test Steps to the Test Case
1. Once the test case is successfully created, you will see a message in the UI that says “Test case successfully created” and “Test Case Details” page should open up.
By default, the first step starts with “Navigate to”. This is because you need to go to a URL to initiate testing.
Now let us see how to Add Test-steps.
2. As we mentioned earlier, the first step has been already added for us - Navigate to test data
You can see that the block next to Navigate to keeps blinking. This is where we are going to put the test data i.e the URL in this step. Copy the URL of Simply Travel Website we are testing and paste it here.
It should look like shown below:
3. Now, click on Create. The first step is now created!
To recall, let's look at the test case we are going to automate once. It will include the below steps:
1. Navigate to Simply Travel website login page: http://travel.testsigma.com/login2. Enter username - admin 3. Enter password - 12345 4. Click on Login button 5. Verify the URL is http://travel.testsigma.com/?name=admin&password=12345&action= 6. Check the checkbox - Non Stop 7. Click on Departure Date picker 8. Click on today's date 9. Click on OK 10. Click on Search Flights
11. Verify the arrival location
4. We will type the second step, which is to enter "admin" in the Username field. To look for the appropriate NLP grammar, start typing Enter. A dropdown with various Enter actions will appear like below:
We can use “Enter test data in the UI identifier field” since we have the UI identifier for the Username field already captured.
When you select it, the “UI identifier” text will be in green:
Double click on UI identifier and delete the placeholder. The ui identifiers available in the repository will appear for you to select as shown below:
From here you can select Username. We had already created this ui identifier earlier in the previous chapter
Select the UI identifier and click on Create to create the second step as shown below:
5. Similarly, create the next step to enter the password - Enter 12345 in the Password field
6. Next step to click on the login button after entering username and password - Click on the Login button
7. Next Step to verify that the login is successful by validating the URL of the landing page - Verify that the current page URL is: http://travel.testsigma.com/?name=admin&password=12345&action=
8. Next Step to check the Non-Stop Checkbox for the Flight search - Check the checkbox - Non_Stop
9. Next, we will need to select the date for the Flight search. To select the date, 3 individual steps are needed as given below:
- To click on the date field
- Select the date
- Click on ‘ok’ button to dismiss the calendar
Above steps are added in steps 7, 8, and 9:
10. Next Step to click on the Search button for flight search: Click on Search
11. Now, let's Verify the arrival location is " WDC-US" using the step Verify that the element arrival_location displays text WDC-US
With this, you have completed Create a Test Case of the Sample Application. In the Next chapter “Run Test Cases” you will learn how to run the Test Cases on different Test Labs.
|<< Chapter 5: Create UI Identifiers||Chapter 7: Run Test Case >>|