Coder Social home page Coder Social logo

tmd-auto-test's Introduction

1. 安装依赖

pip3 install -r requeirments.txt

2. 环境变量BASE_HOST

## 指定运行的apiHost默认: http://192.168.0.129:31000
export BASE_HOST=''

3. 运行

pytest -s --env=pro
# --env=pro指定环境,可选,如果不写默认是--env=test

4. 注解说明

  1. 指定运行所有说明
@pytest.mark.runALL

5. 代码生成地址

http://192.168.0.14:7070

6. 代码格式化插件

autopep8

7. 测试报告

pytest -s  --alluredir=./allure-report 生成报告
allure serve  ./allure-report
# 安装 https://allurereport.org/docs/gettingstarted-installation/

8. 用例数据格式说明

type casesItem = {
  /** 用例标题 */
  title: string,
  /** 是否在生产环境运行 */
  runPro?: "true" | "false",
  /** 路径参数 activity/changeActivity/{id} 传入{id: 1}输出activity/changeActivity/{1}*/
  pathParams?: Dictionary,
  /** 接口参数 */
  data?: Dictionary,
  /** 期望的结果 */
  expected: {
      header: Dictionary
      body?: Dictionary
  }
},

type DataCases = {
  /** 用例分类 */
  feature: string,
  /** 用例函数名称 */
  funcNameSpace: string,
  /** 重要等级 */
  funcNameSpace: 'BLOCKER' | 'CRITICAL' | 'NORMAL' | 'MINOR' | 'TRIVIAL',
  /** 用例数据相对路径 */
  casePath: string,
  /** 接口路径 */
  path: string
  /** 详细用例数据 */
  casesList: casesItem[]
}

tmd-auto-test's People

Contributors

jasonchen-spotec 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.