当前位置:网站首页>0 foundation how to learn automated testing? Follow these seven steps step by step and you will succeed
0 foundation how to learn automated testing? Follow these seven steps step by step and you will succeed
2022-07-02 03:37:00 【Little brother said test】
Now many testers are a little anxious , There is no basis for taking it for granted , Start automated testing within a week .
In the process of automation, someone will always make very low-level problems , There are grammar problems , There is a positioning problem , And someone even __init__.py The file names are all wrong , And will pageage( Package name ) Name it selenium、appium And so on, which makes it impossible to import the corresponding library and so on .
Write a selenium An exception is thrown if the script execution is unsuccessful , There's no way to start ? All exception types prompt NoSuchElementException, Tell you that there is no such element , What if the element cannot be found .
There will be various wonderful problems in the process of automated testing , Sometimes it makes people speechless , People with flexible thinking can always find all kinds of wonderful solutions , And for those who are rigid in thinking , Like a natural moat , Completely blow your confidence in automated testing .
The problem is complicated , In fact, the solution to the problem is very simple , Just didn't learn the basics well , Do not understand or master a programming language , Today I will talk about how to learn Automation ?
One 、 Programming language is the foundation of everything
Do a good job in automated testing , Programming languages are the foundation , It's the first thing . However, most testers do not know programming , I feel programming is difficult and I don't want to learn programming , Without programming foundation, you can directly start automated testing , Lead to frequent errors , The more you do, the less confidence you have , Into the dead cycle .
It's hard to learn automation without programming foundation , It's very difficult to , People who can program can start automated testing in two to three weeks , If you can't program, you've done it for half a year , You may not have started yet .
Of course, some people will say :‘ Now automated test tools have recording function , I'll just record the code .’ I can only use it. ‘ ha-ha ’ Respond to you . You can try to record several test scripts , See how long the recorded script can last . Therefore, it is absolutely impossible to do automated testing without knowing programming .
About learning selenium Choice of language , recommend python3 , secondly java , It is not recommended to choose other languages , It is difficult to find information when the minority language encounters problems . but java The cost of language learning time is too high , So I suggest you study Python.Python Simple 、 Easy to understand , The cost of learning is low , And it's strong enough ,Python What he can do is always beyond your imagination , The same thing python The implementation of is often simpler .
I'm learning Python Don't learn to do automated testing Python,selenium It's just python Just a library in ,Python He still has thousands of Treasuries , He can help you do all kinds of things , Such as requests Library can let web Interface automation testing becomes very simple .
Two 、Python Study
First step : Learn first python ------- python Don't pass the test , Don't talk about automation .

Get all learning routes at the end of the text
3、 ... and 、 Front end Basics
Learning a programming language is the first step in the foundation of automated testing , In order to do well in Automation , You also need to add simple front-end basic knowledge :
HTML( Web page structure , The various tag , Like links 、 Input box 、 Which tag is used for buttons, etc )
JavaScript( Simple understanding , Need to be able to write simple steps )
Firebug perhaps Chrome Use of developer tools ( Must be able to , It is the most commonly used tool for capturing elements )
Be careful : Here's another reminder
Many novices learn complex automated testing tools from the beginning , Study web You need to understand before automated testing HTTP agreement ,HTML Mark ,DOM . If you don't know these , Then there is no way to talk about the later element positioning and operation . And you don't know how to deal with very simple problems , Can't find a point .
In short, learning automated testing , Step by step , First lay the foundation .
Four 、selenium Study
stay selenium Understand before learning selenium Principle ,selenium To operate the browser, you need to rely on the driver , The driver version also corresponds to the browser version , In especial IE browser .
selenium Learning process :
Browser control ( Open the web page , Maximize , close )
Element localization ( first id,name,link text secondly class,partial link text, Last xpath)
Operational elements ( Click on , Input , Whether or not visible )
Drop down box processing
Waiting time ( Fix , dominance , Recessive )
Browser pop-up operation
frame Handoff
Switch between browser tabs
js Operate page elements
Simulate mouse and keyboard operation
5、 ... and 、python Unit test framework unittest Study
Learned to selenium It's not enough , To manage use cases, you also need to learn the unit test framework ,Python There are a lot of unit testing frameworks , recommend unittest perhaps nose, Both materials are easy to find and easy to use .
unittest You can simply learn the basic structure , know setUp,test_XX,tearDown Execution order of , Batch use case execution ,HTMLTestRunner Test report ,DDT Data driven .
6、 ... and 、 Write your own test framework
Learned a 、 Two 、 The three step , Congratulations, you have stepped into the door of automated testing , Finally, you should learn the idea of automated testing , The process of automated testing , matters needing attention .
Write your own test framework , The framework should have the following functions : Common operation encapsulation 、 Data management 、Html Test report 、 Basic functions such as planning and execution of use cases .
Then slowly add functions to your testing framework , You can use configuration files for common data (configparser)、 A parameterized (DDT)、 Log (logging), Scripts execute automatically , Automatically send reports , Failure case rerun, etc , A mature automated testing framework is built , Yours Python Skills can also improve a lot .
7、 ... and 、 Automated testing ideas
The absolute height of thought , You just learned how to use automated testing tools , There is also the theory of automated testing , You have to understand .

Automated learning resource sharing
Finally, thank everyone who reads my article carefully , Watching the rise and attention of fans all the way , Reciprocity is always necessary , Although it's not very valuable , If you can use it, you can take it

These materials , For those who want to advance 【 automated testing 】 For our friends, it should be the most comprehensive and complete war preparation warehouse , This warehouse also accompanied me through the most difficult journey , I hope it can help you ! Everything should be done as soon as possible , Especially in the technology industry , We must improve our technical skills . I hope that's helpful …….

边栏推荐
- Global and Chinese markets for infant care equipment, 2022-2028: Research Report on technology, participants, trends, market size and share
- 初出茅庐市值1亿美金的监控产品Sentry体验与架构
- 蓝桥杯单片机省赛第十二届第二场
- Exchange rate query interface
- Which of PMP and software has the highest gold content?
- KL divergence is a valuable article
- Continuous assignment of Verilog procedure
- 终日乾乾,夕惕若厉
- Global and Chinese markets for hand hygiene monitoring systems 2022-2028: Research Report on technology, participants, trends, market size and share
- 焱融看 | 混合雲時代下,如何制定多雲策略
猜你喜欢

MySQL advanced (Advanced) SQL statement (II)

Pycharm2021 delete the package warehouse list you added

蓝桥杯单片机省赛第六届

How to establish its own NFT market platform in 2022

《MATLAB 神经网络43个案例分析》:第41章 定制神经网络的实现——神经网络的个性化建模与仿真

MySQL index, transaction and storage engine
On redis (II) -- cluster version

傅里叶级数

知物由学 | 自监督学习助力内容风控效果提升

MySQL之账号管理
随机推荐
蓝桥杯单片机省赛第六届
数据库文件逻辑结构形式指的是什么
Global and Chinese markets for hand hygiene monitoring systems 2022-2028: Research Report on technology, participants, trends, market size and share
Kotlin basic learning 14
Oracle common SQL
[数据库]JDBC
This article describes the step-by-step process of starting the NFT platform project
Oracle的md5
蓝桥杯单片机省赛第十二届第二场
Large screen visualization from bronze to the advanced king, you only need a "component reuse"!
蓝桥杯单片机第四届省赛
How to do medium and long-term stocks, and what are the medium and long-term stock trading skills?
Intersection vengraph
一天上手Aurora 8B/10B IP核(5)----从Framing接口的官方例程学起
Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud
< job search> process and signal
Discrimination between sap Hana, s/4hana and SAP BTP
Eight steps of agile development process
/silicosis/geo/GSE184854_scRNA-seq_mouse_lung_ccr2/GSE184854_RAW/GSM5598265_matrix_inflection_demult
PY3, PIP appears when installing the library, warning: ignoring invalid distribution -ip