The basic idea of selenium automation

since Dynamic test model
An automated testing framework is an integrated system that includes Test function library, test data source, test pair
Image recognition standards, and reusable modules . The automated testing framework has gone through several stages in the development process, module-driven testing, data

Data-driven testing, object-driven testing .

The stages of automation currently working are as follows

Stage 1 - Linearity Test
By recording or writing scripts, a script completes a scene (a set of complete functional operations), and automatically plays back the script
chemical test. This is an early form of automated testing; we practiced using webdriver in the previous chapter
Script written by the API
Features:
Through the script in the above figure, we find that its advantage is that each script is independent, and any script file can be taken out.
Running alone; of course, the disadvantages are also obvious , the development and maintenance costs of use cases are high:

Stage 2 - Modularization and Class Libraries

In the above script, a lot of content is actually repeated; so we consider whether we can put the repeated parts
Write it as a public module and call it when needed, which greatly improves the efficiency of our scripting.

Features:
On the one hand, the development efficiency is improved, and there is no need to write the same script repeatedly; if I have already written a login module, I need to follow
What it does is to call it where it is needed, without repeating the wheel.
On the other hand, the maintenance of the code is convenient. If the login module changes, I only need to modify the code of the login module in the login.py file.
code, then all scripts that call the login module do not need to be modified.


Upgraded Version--Data Driven
Data-driven should be an advance in automation; in its original sense, data changes (updates) drive the execution of automation, thereby
cause changes in test results. This is obviously a very advanced concept and idea. In fact, we can directly understand it as parameterization, input data
The difference in data leads to changes in the output results


Stage Three: Keyword Driven

理解了数据驱动,无非是把“数据”换成“关键字”,通过关键字的改变引起测试结果的改变。
关键字驱动用编程方式就不太容易表现了“填表格”式的关键字驱动帮我们封装了很多底层的东西,我们只
要考虑三个问题就可以了: 我要做什么? 对谁做?怎么做?

第四个阶段:行为驱动~

这部分暂时还在研究中,后续会进行总结



Guess you like

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