Three hands-on software testing projects (with a full set of videos and source code) secretly rolled

Project 1: 12306 ticket grabbing project

Project testing purpose

Learn how to locate web elements with Selenium and be proficient in using browser debugging tools

Project main steps

1) Manually go through the process, knowing the automated process 2) Split by steps, and then write automation scripts for each small step 3) Combine all steps, run multiple times, and test the script

Need to pay attention to the complete project and project source code and private message me with the keyword "project" to obtain it yourself

Project Description

1. Open 12306

#Open URL driver.get('https://kyfw.12306.cn/otn') #Sleep five seconds to automatically select verification code time.sleep(5)

2. Login to 12306

1) On the chrome interface, press the F12 shortcut key to pop up the chrome debugging tool

2) Find out the id of the login button and the id of username and password

locate elements by id

 
 

driver.find_element_by_id("username").click() driver.find_element_by_id("username").send_keys("[email protected]") driver.find_element_by_id("password").send_keys("***") print("continue") time.sleep(15)

Locate elements based on the text of the link

 
 
 
 

driver.find_element_by_link_text("Ticket booking").click() time.sleep(5)

select departure

** Use js code to freeze the browser interface. setTimeout(function(){debugger;}, 5000) **

#Starting place selection driver.find_element_by_id("fromStationText").click() # setTimeout(function(){debugger;}, 5000) driver.find_element_by_css_selector(u"[title=Guangzhou]").click() time.sleep( 5)

Right click on the code location and select copy selector

Select departure date

Select the type of train: 3. Experimental analysis: 1. The abnormal verification code of 12306 will not be cracked. The verification code is not automatically cracked, so leave five seconds to manually select the verification code yourself. 2. Because it is a student certification, one more step needs to be confirmed (if you are not a student, you can remove it) 3. The ticket is booked successfully

Project 2: E-commerce system project

Project name: ET.Mall shopping mall system

Module: E-commerce

For this web page, I wrote a test case. If you need it, you can follow and private message me with the keyword "project", and get it for free

Including registration and login, browsing products, shopping cart, order processing, and your own analysis ideas.

Requirements specification:

It is the software requirements specification of the e-commerce platform, and the purpose of writing is to convert the user's functional requirements into the software requirements of the product.

Guide the development and implementation of follow-up products.

Learn

Through this practical training, I hope you can learn:

Write test cases (xmind tool)

Execute the test case

Bug Management (Zen Tao)

Student management system (interface test project)

The following content is a list of relevant interfaces of the student management system extracted from the API document. Please test the implementation of each interface according to the list description

PS: The system is implemented in strict compliance with the RESTful architectural style, through exercises to strengthen the understanding and knowledge of the RESTful architectural style

1. Query

1.1 Faculty - query all

Request method: GET

Request address: http://127.0.0.1:8099/api/departments/

1.2 Faculty - Query Designation

Request method: GET

Request address: http://127.0.0.1:8099/api/departments/T02/

(Note: T02 is the college ID;)

1.3 According to the specified parameters, perform related queries on College-List-$dep_id_list

Request method: GET

Request address: http://127.0.0.1:8099/api/departments/?$dep_id_list=T01,T02,T03

(Note: $dep_id_list: is the parameter name; T01, T02, T03 are: College ID;)

1.4 Academy-List-$master_name_list query

Request method: GET

Request address: http://127.0.0.1:8099/api/departments/?$master_name_list=Java-Master,Test-Master

(Note: $master_name_list: is the parameter name; Java-Master, Test-Master is: Dean's name;)

1.5 Academy - Blurred

Request method: GET

Request address: http://127.0.0.1:8099/api/departments/?blur=1&dep_name=C

(Note: blur: to enable fuzzy query parameter 1 is to enable; dep_name: is the parameter name; C: the college name contains characters;)

1.6 Academy - Portfolio

Request method: GET

Request address: http://127.0.0.1:8099/api/departments/?slogan=Here is Slogan&master_name=Test-Master&dep_name=Test College

(Note: dep_name: the name of the college; master_name: the name of the dean; slogan: the slogan of the college; the three conditions can be combined or used alone)

Need to pay attention to the complete project and project source code and private message me with the keyword "project" to obtain it yourself

Guess you like

Origin blog.csdn.net/Androidyuexia/article/details/130642638