Learn this automated testing artifact, you can do it without writing code!

♥ Foreword

To do automated testing, you must understand that it is DDT data-driven testing. The advantage of this is that you can perform flexible testing through one or more sets of data without hard coding.

So today we will explain how Katalon reads test data.

Data formats supported by Katalon

Excel

CSV

database data

internal data

prerequisite preparation

  1. Create an Excel file and enter the test data

  2. Record the executed test cases through katalon, and remove the recorded test data in the input

1. Create a testdata in Excel format in Data Files

picture

 If you want to learn automated testing, here I recommend a set of videos for you. This video can be said to be the first interface automation testing tutorial on the entire network at station B. At the same time, the number of online users has reached 1,000, and there are notes to collect and various Lu Dashen Technical Exchange: 798478386      

[Updated] The most detailed collection of practical tutorials for automated testing of Python interfaces taught by station B (the latest version of actual combat)_哔哩哔哩_bilibili [Updated] The most detailed collection of practical tutorials for automated testing of Python interfaces taught by station B (actual combat) The latest version) has a total of 200 videos, including: 1. Why should interface automation be done in interface automation, 2. The overall view of request in interface automation, 3. Interface combat in interface automation, etc. UP hosts more exciting videos, please pay attention to UP account . https://www.bilibili.com/video/BV17p4y1B77x/?spm_id_from=333.337&vd_source=488d25e59e6c5b111f7a1a1a16ecbe9a 

Key knowledge:

After adding the Excel file, there are three setting items:

Use first row as header: Checking it will automatically remove the title of Excel for you (checked by default)

Use relative path: If you put Excel in the folder corresponding to the katalon project, you can use a relative path, that is, after checking it, you only need to enter the file name, and you don’t need an absolute path (not checked by default)

Bind to test case as string: Bind to the test case as a string (checked by default)

Finally: Be sure to remember to save this datafiles file after adding Excel

2. Create a variable in the test case to receive the data in Excel, the default value can not be filled in

picture

Key knowledge:

Be sure to save the test case

3. Create a TestSuite and configure a test case

picture

4. Bind the variables in the test case to Excel data

picture

Key knowledge:

Be sure to save the Testsuite

5. Run the test case to see that multiple test cases will be executed according to the amount of data in Excel

picture

So far, katalon has implemented DDT data-driven testing~~~

Guess you like

Origin blog.csdn.net/m0_73409141/article/details/132306253