Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Prerequisites

Make sure to have new branch created in Gitlab, that will be used only for this Postman tests. Reason is that after we edit “.gitlab-ci.yml” file, we won’t be able to use this branch for Cypress tests.

Step 1:

Export tests from Postman to your PC and name the package “collection.json”. Click right click on your test folder => click “export” => click again “export” => name it “collection.json”.

Step 2:

Upload “collection.json” to your Gitlab branch. Make sure that you are in your newly created branch.

Step 3:

Edit “.gitlab-ci.yml” file that is in Gitlab repository (in case there is no such a file in Gitlab repository, make sure to create new one and name it as “.gitlab-ci.yml“). In this file delete entire text that is there and past this text:

stages:
    - test

postman_tests:
    stage: test
    image: 
        name: postman/newman:alpine
        entrypoint: [""]
    script:
        - newman --version
        - newman run collection.json

b-ci.

Conclusion:

After this edit, your Postman tests should run in Pipeline. In this link, you can find example of Postman tests on Gitlab pipeline: https://gitlab.pricefx.eu/logic/qa-training-logic/-/jobs/1578645.

  • No labels