Data-driven and keyword-driven automated testing

参考:《Pros and Cons of Data-driven versus Keyword-driven Automation Frameworks》

 

data driven

  • advantage

> Start writing test scripts while the system/function under test is still in development.

 

> Modular script design and use of data sets reduce redundant scripts. When the function of the system under test changes, only the specific script related to this business function needs to be modified.

 

> Inputs, expected results, etc. data can be stored as easily accessible records.


> Test scripts can be designed to be robust and almost unattended.

 

 

  • shortcoming

> Strong familiarity with scripting languages ​​required by automation tools is required.

 

> The expansion of the test range will lead to a very large number and types of test data, and the cost of maintaining these data will increase.

 

> When the test engineer maintains the specific test plan, the data file needs to be reset to meet the plan requirements.

 

> Careful attention should be paid to the format of the data when maintaining data files, as more intelligent editing tools are often not available. Otherwise, you need to deal with various formatting issues in the script (don't do this, it is difficult to maintain and easy to dig).


keyword driven

  • advantage

> Concise test data can be included in specific test plans.


> Test engineers don't need to care about the scripting languages ​​required by the automation tools, but directly call the general-purpose script blocks written by professionals in these scripting languages.


> Test engineers can be very productive because they only need to know some specific keywords and how to use the format of those keywords. The quick onboarding feature can delay detailed tool usage training.

 

 

  • shortcoming

> As with other modes, if testers want to create custom test functions, they must have a good understanding of the scripting language required by the test tool. (Of course, also know about other existing keywords and various possible usage formats). But this is only an initial difficulty. Once the test engineer learns this, it will be much easier to create and maintain test cases.



Common testing frameworks combine data-driven and keyword-driven.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326453510&siteId=291194637