I want to classified tests to run them for different purposes. As far as, I search I could not an option to tag
some test and run test on demand. I also looked at Chaijs if it has such a feature, but could not be able to find a solution.
What I want to do is add some tag like the following:
@health_check
pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});
@smoke
pm.test("Product should be correct", function () {
var jsonData = pm.response.json();
var product = pm.variables.get("PRODUCT");
pm.expect(jsonData.meta.appId).to.eql(product);
});
and run it like as following or anyway achieve this:
$ newman run mycollection.json -tag smoke