我对Gitlab,newman和docker都很陌生,我正在上一门关于如何把所有东西整合在一起的速成班。
在我的桌面(Windows )上,我安装了newman,并通过windows命令行运行了"newman集合“。
我最终想要做的是在Gitlab中运行newman命令。在..gitlab ci里,我有一个:
stages:
- test
Test_A:
stage: test
image: postman/newman
script:
- newman run Collection1.json我想到了几个问题:
Update#2
stages:
- test
before_script:
- npm install -g newman
- npm install -g npm
Test_A:
stage: test
script:
- newman run Collection1.json发布于 2021-04-01 05:35:25
首先要识别的是GitLab管道是如何执行的。
我个人的选择是使用基于码头的跑步者。
如果您使用GitLab停靠器运行管道,那么您只需在.gitlab-ci.yml文件中定义容器映像即可。
下面是一个经过测试(在GitLab.com上)版本的管道yml
stages:
- test
run_postman_tests:
stage: test
image:
name: postman/newman
entrypoint: [""] #This overrides the default entrypoint for this image.
script:
- newman run postman_collection.jsonhttps://stackoverflow.com/questions/66866965
复制相似问题