anshooarora / extentreports-java

Community version of Extent API for Java has moved to https://github.com/extent-framework/
http://extentreports.com
Other
528 stars 318 forks source link

Total Time Taken and TIMESTAMP values incorrect using 2.40.1-beta2 #253

Closed carlc986 closed 8 years ago

carlc986 commented 8 years ago
  1. The 'Total Time Taken' on the Analysis page is incorrect, it says 1s+3ms on my report when the tests actually took 1 min, 36 seconds, bitmap included. Is there fix for this, if not, what class is this derived in?
  2. The 'TIMESTAMP' column on the Test Details page is incorrect, it is displaying the end time of the entire suite and not the individual test, bitmap included. Is there a fix for this, if not, what class is this derived in?
  3. Is there a way to remove the Steps View from the Analysis Page? If not, I'd like to change the title of it, what class is it derived in?

Thanks.

anshooarora commented 8 years ago

Do you have replaceExisting = false in initialization? Are the tests being run sequentially, or one after the other in breaks? Are you using Extent with TestNG listener?

To remove steps view or rename the heading, you can use javascript from config.xml.

anshooarora commented 8 years ago

Note: Please hide the user names and passwords from your snapshots. I have removed them for now.

carlc986 commented 8 years ago

Hi, thanks for the info on the bitmaps. I tried changing the replaceExisting=false but had the same results. I am using TestNG and running the tests sequentially, and also using a TestNG listener that I built, but it is not tied into the Extent reporter, how would I do that? What is the advantages?

Also, can you provide me with a code sample for changing the TIMESTAMP heading and for removing the Steps View? I'm not that familiar with JS. I may want to just change the name as well, what's the command for that? Thanks.,

anshooarora commented 8 years ago

The total time taken is calculated for a complete run session. If you use replaceExisting = false, what happens is:

The total time is not going to be 1min 30 secs after 2nd run, it will be 1min because that is how long it took to complete Run 2. This is by design and is to provide the total time it took to complete the most recent run - as you can use replaceExisting = false to build upon a report for days/weeks.

Support is currently not provided to make any changes to the template/look-and-feel of the UI. Extent uses jQuery to make it easy to make modifications which you can add in the <scripts> tag of config.xml.

Here is the method to be used to modify text. Here is the method used to hide elements.

carlc986 commented 8 years ago

I'm not sure I follow you on the total time, why would the total time be for just the last testcase run, that doesn't make sense? You're already putting the individual elapsed times with each testcase detail, so it would seem to me that the overall report would have the total time for all the tests in the suite, otherwise, it's a useless data point. Is there a way I can change this also using JQuery?

anshooarora commented 8 years ago

Well, not exactly. Think of it this way: replaceExisting = false appends an already existing report.

If Run 1 occurred yesterday, and took 30 seconds, total time = 30 secs. If Run 2 occurred today, and took 30 seconds, total time would be? 24+ hours?

The next release adds up time taken by all test cases and displays it here, but it's not always gong to match the difference between the report started and ended times.

*Edit: Correction: next release will show current session runtime and also total run time for all tests.

carlc986 commented 8 years ago

OK, when is the next release?

anshooarora commented 8 years ago

It will be beta-4, sometime next week.

anshooarora commented 8 years ago

Beta-4 is out as standalone and maven download.