I am using jscoverage-server.exe and storing report using jscoverage_report(); at the end of jsunit test suite. I want to know if its possible for the report page to have date. The date should be the one on which Jsunit test suite was run.
Thanks
Date on JSCoverage report
-
- Posts: 120
- Joined: 2008-10-11 6:52 pm
Re: Date on JSCoverage report
There is no way to change the name of the page, but you can change the name of the report directory, in two ways:
- Use the --report-dir option to jscoverage-server.exe; e.g.,
Code: Select all
jscoverage-server.exe --report-dir=jscoverage-report-2009-4-21
- Pass the name of the directory as a parameter to the jscoverage_report() function; e.g.,
Note that in this case you will get an additional directory level in your directory structure.
Code: Select all
var date = new Date(); var y = date.getYear() + 1900; var m = date.getMonth() + 1; var d = date.getDate(); jscoverage_report('jscoverage-report-' + y + '-' + m + '-' + d);
-
- Posts: 6
- Joined: 2009-04-06 3:19 pm
Re: Date on JSCoverage report
Hello Ed,
thank you. What abt doing search and replace on jscoverage.html from "<h1>JSCoverage</h1>" to "<h1>JSCoverage ${DATE}</h1>" ?
Regards,
les
thank you. What abt doing search and replace on jscoverage.html from "<h1>JSCoverage</h1>" to "<h1>JSCoverage ${DATE}</h1>" ?
Regards,
les
-
- Posts: 120
- Joined: 2008-10-11 6:52 pm
Re: Date on JSCoverage report
Certainly, once the report is generated you can modify the report HTML any way you like. (But there is no functionality built into jscoverage to do this.)