How to read a test name and display as iteration name in htmlextra report next to iteration 1: Collection Name in Total Requests Tab

Hi,
Currently iteration names in Total Request Tab have same name which is very difficult to identify the intended Test API call. I am just trying to find is there anyway we can change or append name to iteration like Iteration: 1 - - < TestName> .

I am seeing this issue when I create a collection with only one parameterized request where URI and reqestBody read from the data file.

Appreciate your help and guidance to resolve this issue.

Hey @bharathiparamkusam,

Welcome to the community! :star2:

As this is quite a specific question relating to a particular project - Could you raise an issue on the GH repo, using the template to add all the relevant details, please?

I will then be able to help you get to the bottom of the problem you’re facing and hopefully we can come up with a solution together.

Hi , I am not using customized template. it’s default template available in the htmlextra.

Will create issue in GH as you mentioned.

Hi @danny-dainton,

The htmlextra reporter is awesome. Just a small question about it. Is it possible to increment the iteration number in the final report? Every time an endpoint is called with different set of test data, can we increased the number instead by showing “Iteration 1” ? In the screenshot, i called the same endpoint 3 times with different set of test data, but “Iteration 1” is shown in all of them. It would be nice if we can show

Iteration 1 - endpoint1
Iteration 2 - endpoint1
Iteration 3 - endpoint1

Iteration 1 - endpoint2
Iteration 2 - endpoint2
Iteration 3 - endpoint3

Is this something that can be done by custom-html-template flag?

Btw, im not using the built in functionality of postman by implementing data files for data-driven testing because my requirement is different. But I have an environment variable for the test datas and i am looping through it and using the postman.setNextRequest to control the execution.

Thanks a lot for your response.

Hey @allen.vargas ,

That’s all being done in the same iteration so that’s why it’s creating the report like that. You’re just looping through a request several times, within the same iteration.

You would see the same on every reporter, it’s not specifically htmlextra. I can only show things based on the data being returned by the Newman run.

Hi @danny-dainton,

Thanks for your reply. Understand that.

Another question though. Can we change the iteration number into something more meaningful? I am thinking of using the built in data files of postman. 1 iteration data will have a field called “scenarioDescription” eg. addANewTaxRate . Another iteration data will have a “scenarioDescription” of editExistingTaxRate and each of these iteration data will have its own endpoints which I need to chain together. For example, in the addANewTaxRate scenario, i will first call getExistingTaxRate and check the the new tax rate (that I am about to add) is not there yet, then call the add a new tax rate endpoint then call again the getExistingTaxRate to check if the new tax rate has been added.

So in the final report, i am looking at the meaningful scenarioDescription as iteration numbers instead of 1,2,3…

Thanks for your reply.

It’s not something that I would be changing in the general report template as it’s not really going to be something for everyone.

This was a request a while ago and this user achieved it by changing the code in the template file and using that as a custom template for run.

More information can be found here.