Giter VIP home page Giter VIP logo

api-test-report-generator's Introduction

api-test-report-generator

api-test-report-generator is a docs RPA , helpful for generating Project API Test Report Document.

Input Data

Necessary

  • API Test Master Data.xlsx
  • API-Result/
  • DB-Schema/
  • Jaeger-Screenshot/
  • Junit-Screenshot/
  • SQL-Statement/

Unnecessary

  • Postman/

OpenShift login account

Check and input the AD account/psw in config/secret.py, it will be utilized in python extractor.py

How to Prepare and Run it

  1. Manually preparing Junit-Screenshot/ and DB-Schema/
  2. Manually preparing API Test Master Data.xlsx, then run python extractor.py will get _ API-Result/ ,Jaeger-Screenshot/ ,SQL-Statement/_ data
    • also,can manually preparing API-Result/ ,Jaeger-Screenshot/ ,SQL-Statement/ data
  • postman data aim to enhance API Test Master Data.xlsx data, run python extract_postman_collection.py, will extract postman data to the excel
  1. Finally, run python generator.py, will generate the api test dist file

Sample run

  • Prepare the required input files

  • Then run follow cmd

python extract_postman_collection.py # unnecessary

python extractor.py
python generator.py

Requirements

  • Python 3.9+

  • PIP

  • Chrome v115+ / current(20231017) chrome ver is v118

  • pip install -r requirements.txt

chromedriver_autoinstaller==0.6.2
openpyxl==3.1.2
pandas==1.4.4
Pillow==10.1.0
Requests==2.31.0
selenium==4.14.0
sql_metadata==2.9.0
sqlparse==0.4.4
urllib3==2.0.6

A lazy way to get tokens

  • After successfully logging into the portal(user/admin)
  • Open the chrome console
  • Copy the user_token_download.js/admin_token_download.js,paste into chrome console,press the Enter key
  • Will auto download the token file in your OS download path
  • When you run python extractor.py, it will use the token file, pls refer extractor.py and config/user_token.json

ChromeDriver

Rest assured, the ChromeDriver file will automatically download during the process.

  • Note!!! Windows need fix some defect, pls refer README-CHROMEDRIVER-DEFECT-FIX.md

Workflow

api-test-report-generator's People

Contributors

orekiyuta avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.