UI automation test case management platform construction

Tools used: python3 + django2 + mysql + RabbitMQ + celery + selenium

There are many tutorials on python3 and selenium on the Internet, so I won’t explain them one by one;

Platform function introduction:

 Project Management: Used to manage projects. Each project can set up multiple environments, such as development environment, test environment, pre-release environment, production environment, etc.

Page management: mainly used to facilitate the management of elements

1.Environment setup

Source code and tool download address:

Link: https://pan.baidu.com/s/1h_JAKj0Yxyem2pyjWRclxQ
Extraction code: a3h1
 

2. Unzip to a folder and cmd to the current folder location

3. Install Django

cd command: pip install django==2.1.7

You may need to update pip to the latest version: python -m pip install --upgrade pip

4.Install mysql

cd instruction: pip install pymysql

5.Install celery

cmd input command: pip install Django-celery

6. Install the database:

  1. Download MySQL5.7rar: http://www.mysql.com/

  2. Unzip

  3. Add mysql bin to the environment variable

  4. Modify my.ini to add configuration:

  5. [mysqld]

  6. basedir=C:\Program Files\MySQL\MySQL Server 5.7

  7. datadir=C:\Program Files\MySQL\MySQL Server 5.7\data

  8. mysqld --initialize-insecure (starting from 5.7, initialization is required)

  9. Install the service: cmd mysqld -install

  10. Start the service: net start mysql

  11. Test login: mysql -u root -p (no password for first login)

Remark:

  The encoding of my.ini file must be English encoding. In windows, it is ANSI.

  Add;%MYSQLHOME%\bin to path #where MYSQLHOME is the name of the created system environment variable, and its value is the mysql installation directory.

  Modify my.ini

  basedir = F:\mysql-5.7.24-winx64

  datadir = F:\mysql-5.7.24-winx64\data

  Delete a service: mysqld –remove, or sc delete [service name]

 7. mysql server and database configuration

 Solution to error 1130:

 >mysql -u root -p

 >use mysql

 >update user set host='%' where user='root';

 >select host,user from user;

 >flush privileges;

Create a new database: the character set needs to be filled in, otherwise the URL will not work properly in Chinese

8. Modify the setting file:

 9. CMD again to the MiDuoTest path;

 Use the command python manage.py migrate to enter the visible table:

  Find the user table and add an account

10. Use the merge command:

python manage.py runserver

11. Log in using the URL:

  127.0.0.1:8000/index

12. OTP installation:

Add %ERLANG_HOME%\bin to path

  cd, if the version number appears, the installation is successful.

13. Install RabbitMQ:

 14.cmd to this directory and enter the command: rabbitmq-plugins enable rabbitmq_management

15. Enter http://localhost:15672 in the browser for verification. You will see the following interface. Enter username: guest, password: guest and you can enter the management interface.

At this point, the environment is set up;

[Latest in 2023] Python automated testing, complete 60 practical projects in 7 days, and provide you with practical information throughout the process. [Automated testing/interface testing/performance testing/software testing]

Finally, I would like to thank everyone who reads my article carefully. Reciprocity is always necessary. Although it is not a very valuable thing, if you can use it, you can take it directly:

Insert image description here

This information should be the most comprehensive and complete preparation warehouse for [software testing] friends. This warehouse has also accompanied tens of thousands of test engineers through the most difficult journey. I hope it can also help you!   

Guess you like

Origin blog.csdn.net/qq_48811377/article/details/133172204