Python language syntax is simple, easy to get started, concise and efficient, is the preferred language in the field of software testing. If you want to use Python to carry out automated testing, or students who have started to use Python but don't know what Python knowledge they should master, I hope this article can be helpful to you.
I started to get in touch with the Python language in 2014. I was working in Irdeto. At that time, I was doing automated testing for the background of the digital video content protection system. The automation tool I chose was Selenium, because the API of Selenium supports many languages. After comparison, I found that The API of the Python language is pleasant to use.
Since 2014, I have been associated with Python. It has been 6 years since I used Python for software testing. In the past six years, I have used Python to do web automation testing, APP automation testing, server interface testing, and testing. Tool development and performance testing. This process is also the process of my understanding of the Python language gradually deepening. From the original 2.7 version to the current 3.8 version, I am familiar with every progress of Python and enjoy the constant surprises that Python brings.
Python is easy to use and easy to get started, but there is a lot of knowledge in Python. This article summarizes the Python knowledge points that I used in the practice of various software testing, which must be mastered by software testing engineers.
01 — 20 Knowledge Modules
There are many Python knowledge points. Here are 20 knowledge modules that I often use in the software testing process.
In this article, I will not expand each knowledge module in detail. The main purpose is to provide you with a learning direction and give a rough introduction to the core content of each module. There will be some demo small programs, which may not explain all the details to everyone. You can check the Internet and books to find out. Also welcome to Knowledge Planet to communicate with me.
02 — Basic Grammar
03 — String
04 — Tuples and lists
05 — Dictionary
06 — Collection
07 — I/O
08 — Loop
09 — Branch
10 — Exception Handling
11 — Function
12 — Modules and Packages
13 — Decorators
14 — Classes and Objects
15 — Inheritance and Polymorphism
16 — Typical class
17 — Iterators and generators
18 — Multiprocessing and Multithreading
19 — Coroutines
20 — log
21 — Summary
This mind map has been stored on my computer for a few years. In fact, it has been continuously improved. Every time I encounter new problems in my work, after solving them through unused Python features, I will add these Python knowledge to Inside the mind map. This method of learning and summarizing is very useful for me and can help me build a structured knowledge system. You can try this method.
I remember that I used a very short e-book to learn Python at that time. It is called "Concise Python Tutorial" in Chinese. This e-book has been updated, and you can read it if you are interested. In addition, the best online textbook in China is the Python tutorial published by Liao Xuefeng on his personal blog. I have read two paper books, one is "Python Core Programming", this book is based on Python2, but the core content is not out of date, the other is "Python Cookbook", this book also has e-edition. If you want to learn Python in depth, it is recommended to take a look at the paid course "Python Core Technology and Practice" on the Geek Time APP. This course explains many underlying principles and advanced usage of Python. If you want to learn, you can purchase the course through the QR code below. At present, more than 16,000 people have studied, and the course is very good.
References
[1] "Concise Python Tutorial" https://github.com/LenKiMo/byte-of-python
[2] Liao Xuefeng https://www.liaoxuefeng.com
[3] "Python Cookbook" https://python3-cookbook .readthedocs.io