Hello, I have a collection in newman with multiple request, that requires checking that for every instance and all the lang of that instance, different services are working. After that, I generate a report (with htmlextra, as is the one I know that allows me to modify the template of the report) with the results of the test.
To collection take a csv like the next one to be execute.
instance, lang
a, en
a, es
b, en
b, es
The problem is that some services doesn’t require checking for lang, only for instance. For most of the request, is fine to execute the request with a-en, a-es, b-en and b-es, but, for one specifc request, is only relevant the instance, so I would only need to execute the request for a and b, only once for each instance.
Note that here I have 2 instances with 2 langs each, but the final csv I have working on have 900 entries, I cannot repeat the same request for the same instance 80 times in the prod environment.
So, I would need some way of running one request only one time for instance, not for every line in the input file.
I have already tried throwing and error in the pre-request-script when it was duplicated (I use a env var to storage the instances already used), but that stops every request, not only the request I want.
I know I could create a new collection only for that request, but that would generate a different report, and I need to have only one report. I also know that I could use allure report that allows to merge two or more reports, but I have made changes in the template, as I need to show in the report the env vars used for each request in an easy way to easy analyze without having to open each iteration.
So, is there a way using the pre-request-script or something to run a request only when the value of a env var change?