Python Django Interface Automation test

Source: Internet
Author: User
Tags mail code import database install django java web pip install django jqgrid

Record the interface Automation test platform developed by yourself:

  Interface testing is less costly, relatively stable, and less volatile than UI testing, and routine testing can be done using postman, JMeter, Python request, and more.

The following is an introduction to the framework for Python request development for interface testing. The function satisfies the batch test, supports the Excel import database, the custom selects the test interface, the chart test statistic and so on function.

The backend language uses Python's Django to develop, had not contacted Django before, this wants to use the Java Web to do backstage, but still wants to try, therefore has this work, fortunately the process also is smooth, the side does the study, several days on the good frame has been completed, the concrete see below mentioned Django.

Development ideas:

1, the main idea Source: combine the daily work to carry on the function design;

2, the interface testing process dependencies: Login information, interface between the interdependence;

3, interface test data Source: Import files to the database, manually add data or modify data;

4, the test results statistics: Chart statistics, data screening;

5, testing Flexibility: multiple, single data automatically according to the development of the results provided and actual results to verify;

Development environment:

1, background language: python;

2, the front-end language: jQuery, CSS, HTML, echarts;

3, database: MySQL;

4, Architecture: object-oriented;

5, the back-end framework uses: Django;

The platform has the function point:

1, data template download;

2, data template upload;

3, single data submission;

4. View all the information of imported data;

5, the test situation statistics;

6, interface data filtering;

7, the interface data additions and deletions to investigate;

8, a single multi-interface automation test verification;

9, interface test automatically get login information, save login status;

10. Send the test report by mail;

11, login authorization;

Django:

Environment:

CMD Install Django:pip install Django

To Create a project:

Django-admin Startproject Intetestplatfrom

  Django Directory Description:

    

  

Enter the Intertestplatfrom root directory to start the Web service:  
Python manage.py runserver
  
Modify urls.py call to increase the browser access address and invoke the specified method for processing   


 

Data template Download:

Data template upload:

Single data submission:

Jqgrid View all information about the imported data:

  It is convenient to use Jqgrid to develop the function of the form.

Echarts Test Situation Statistics:

 

Mail send test report: Mail code

Back features with related code structure to be updated ...

Python Django Interface Automation test

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.