✔ Data-Driven Testing With TestProject | (Video 122)

Publicado el: 03 agosto 2020
en el canal de: Rex Jones II
710
20

Data-Driven Testing With TestProject

✌🏽 TestProject Playlist    • TestProject Free Automation Platform  
✌🏽 Click For TestProject's Free Platform https://link.testproject.io/c3g

► Free Selenium PDF Book: https://www.rexjones2.com/book-seleni...
► Free Java PDF Book: https://www.rexjones2.com/book-part-1...
► All Paperback & eBooks: http://tinyurl.com/Rex-Allen-Jones-Books

Social Media Contact
✔ YouTube    / rexjonesii  
✔ Twitter   / rexjonesii  
✔ LinkedIn   / rexjones34  
✔ GitHub https://github.com/RexJonesII/Free-Vi...
✔ Facebook   / jonesrexii  

► Download Transcript via Website = https://www.rexjones2.com/data-driven...
► Download Transcript via GitHub = https://github.com/RexJonesII/Free-Vi...

Transcript
Data Driven Testing allows us to run 1 test using more than 1 set of data. The data drives our test and can be stored in different file formats. Some of the formats are CSV file, JSON file, Excel Sheet, or Database. TestProject supports Data Driven Testing and use a CSV file to hold the data as input.

There are 5 steps to perform Data Driven Testing with TestProject: First – We create a Test, Second - Add Parameters For The Test, Third – we Create a Data Source That Stores The Input Test Data, Fourth - Connect the Data Source To The Test, and Fifth – We run The Test.
We start by having a test. I am going to use this existing Login Test. I created this test in a previous video. It has 6 steps. Do you see ApplicationURL in Step 1? ApplicationURL was parameterized by default. We are going to parameterize Step 3 for name and Step 4 for password.

We can click these 3 vertical dots and select Parameters or Click the step, scroll down to the Keys section. Here’s the hard-coded static value Rex Jones II. Click the +. We see Project and Test. Project allows us to use parameters for more than 1 test. Test let’s us use parameters for only 1 test. The purpose of parameterization is to replace hard coded static values with variables. Add a new parameter by clicking the + symbol at the bottom. Erase the hard-coded value. This Add parameter section supplies a Name, Description, and Value.
Name will be Name, Description will be Enter Name, Value is not required so I will leave it blank. Click the Add button. We see the hard-coded value was replaced by the parameter. If you wanted to, you can combine a parameter with a hard-coded value. For example, I can write Dr. in front of the parameter. The value will be entered as Dr. and the parameter Name. When we are finished, click the check mark at the bottom then click Save. Now, Step 3 no longer shows the hard-coded value.

Repeat the same process for Step 4 Password. Click the step, Scroll down to the Input Parameters - Keys section. Erase 12345, click the +, then click + again at the bottom to add a new parameter. This time, Name will be Password, Description Enter Password, Value is 12345. We can hide the value by making it a secret then click Add. Next we click the check mark and click Save.

We can also add a parameter to a validation step. Step 6 validates the greeting name is correct. We see the Validations section has Contains Rex Jones II. Select and remove the hard-coded value then select the Name. Check mark to lock in the changes then Save. Step 3 and Step 4 are parameterized as input data. Step 6 has a validation parameter.
TestProject also allows for Output Parameters. Click these 3 vertical dots then select Input/Output and here’s the Test output parameter. The benefit of output parameters is when you want to get information from a test then store that information. You can use that information for another test. Save and Exit.

Now, let’s create the Data Source. Go to these 3 horizontal dots then select Data Source Template. A CSV File opens up. The first column is ApplicationURL. We don’t need that step. So, remove that default parameter. Let’s add 5 data sets: Joe Doe / password 54321, Jane Doe / password 12345, James Doe / password 98765, Janice Doe / password 87654, John Doe / password 12345. Only John Doe and Jane Doe will Pass because they have the correct password. Save.

At this point, we can go to Data Sources then Add a data file or Add a new Data Source. Both options bring up this panel to add a new Data Source. We can also go to test to add a Data Source. Click the Run button for Login Test, Select the browser, Next.
We can override the default input parameters in our CSV File by entering a Name and Password in these 2 fields or Use the Data Source.

#DataDrivenTesting #TestProject #SeleniumWebDriver


En esta página del sitio puede ver el video en línea ✔ Data-Driven Testing With TestProject | (Video 122) de Duración hora minuto segunda en buena calidad , que subió el usuario Rex Jones II 03 agosto 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 710 veces y le gustó 20 a los espectadores. Disfruta viendo!