使用postman测试运行的json输出并输出简单csv格式的cli。
postman-to-csv的Python项目详细描述
使用json格式的postman结果文件并输出 结果的简单csv文件。
安装
pip install postman-to-csv
用法
几个例子:
# Convert the JSON results to CSV without any build information postman-to-csv \ --input 'test-results.json'\ --output 'test-results.csv'# Flesh out additional information about the build postman-to-csv \ --input 'test-results.json'\ --output 'test-results.csv'\ --projectname 'my-web-api'\ --branch 'release'\ --buildnumber '1.2.3.4'\ --deployenv 'stage'\ --testtype 'integration'# Providing all of the available flags postman-to-csv \ --input 'test-results.json'\ --output 'test-results.csv'\ --projectname 'my-test-project'\ --branch 'release'\ --buildnumber '1.2.3.4'\ --buildtarget 'AnyCPU'\ --buildstatus 'pass'\ --deployenv 'stage'\ --testtype 'integration'
限制
这是为了提供一种简化的数据格式,可以用来 将邮递员测试的结果加载到数据存储中以进行跟踪和 韵律学。它基于纽曼4.2.3的输出格式,包含 关于测试用例和断言的最少信息。如果你需要 更完整的信息,我建议您解析json 直接的。
将更新发布到pypi
对于维护者-发布ssm search的更新版本, 在version.py中增加版本号并运行以下命令:
docker build -f ./Dockerfile.buildenv -t postman-to-csv:build . docker run --rm -it --entrypoint make postman-to-csv:build publish
在提示中,输入pypi.org repo的用户名和密码。
测试
使用打包的测试文件在容器中执行测试。
docker build -f ./Dockerfile.buildenv -t postman-to-csv:build . docker run -it postman-to-csv:build postman-to-csv --input <postman JSON> --output <output file name>