当前位置:网站首页>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 …….
边栏推荐
- Grpc快速实践
- In the era of programmers' introspection, five-year-old programmers are afraid to go out for interviews
- Generate random numbers that obey normal distribution
- Learn PWN from CTF wiki - ret2shellcode
- Global and Chinese markets for welding equipment and consumables 2022-2028: Research Report on technology, participants, trends, market size and share
- 蓝桥杯单片机省赛第九届
- "Analysis of 43 cases of MATLAB neural network": Chapter 41 implementation of customized neural network -- personalized modeling and Simulation of neural network
- Exchange rate query interface
- Oracle viewing locked tables and unlocking
- Kotlin基础学习 16
猜你喜欢
一天上手Aurora 8B/10B IP核(5)----从Framing接口的官方例程学起
JIT deep analysis
Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud
知物由学 | 自监督学习助力内容风控效果提升
[golang] leetcode intermediate bracket generation & Full Permutation
Comment élaborer une stratégie nuageuse à l'ère des nuages mixtes
In wechat applet, the externally introduced JS is used in xwml for judgment and calculation
Large screen visualization from bronze to the advanced king, you only need a "component reuse"!
Docker installs canal and MySQL for simple testing and implementation of redis and MySQL cache consistency
蓝桥杯单片机省赛第八届
随机推荐
PY3, PIP appears when installing the library, warning: ignoring invalid distribution -ip
蓝桥杯单片机省赛第十二届第一场
Download and use of the super perfect screenshot tool snipaste
Imageai installation
Oracle 常用SQL
In wechat applet, the externally introduced JS is used in xwml for judgment and calculation
Global and Chinese markets for ultrasonic probe disinfection systems 2022-2028: Research Report on technology, participants, trends, market size and share
接口调试工具模拟Post上传文件——ApiPost
Kotlin基础学习 14
Haute performance et faible puissance Cortex - A53 Core Board | i.mx8m mini
Kotlin basic learning 14
蓝桥杯单片机第四届省赛
Basic syntax of unity script (7) - member variables and instantiation
焱融看 | 混合云时代下,如何制定多云策略
蓝桥杯单片机省赛第十一届第一场
uniapp 使用canvas 生成海报并保存到本地
Unity脚本的基础语法(6)-特定文件夹
Yan Rong looks at how to formulate a multi cloud strategy in the era of hybrid cloud
Kotlin basic learning 13
How to do medium and long-term stocks, and what are the medium and long-term stock trading skills?