how to get screenshots, logger messages into results/${class-name}.html file? [message #648083] |
Tue, 11 January 2011 02:33  |
Eclipse User |
|
|
|
I'm using swtbot for last 2/3 months and had a good experience using it. I use headless test framework and I get .html, .txt and .xml in 'results' folder.
I often generate screenshots, logger messages to analyze failures. I got the screenshots in 'results' folder by specifying the folder name along with filename. I also generated logger output in 'results' folder by editing log4j.xml. But in this setup, all the things are scattered in different files.
I want to have a consolidated html report in which I should see all the things (screenshots, logger messages and standard html output with test pass/fail status etc.) in a single file.
That would be very easy to analyze the failure when you have lot many tests. Currently I've to first look at the .html. If there a failure then I've to open logger messages output file. I also need to open screenshots files side by side and then I can analyze the failure reason. It would be great help if all such things come in a single file.
I looked at JUNIT.XSL, library.xml in org.eclipse.swtbot.eclipse.junit4.headles_xxxx folder. But doing changes in those files seems difficult.
Is there any known standard method to get consolidated report including screenshots, logger output and html standard output?
|
|
|
Re: how to get screenshots, logger messages into results/${class-name}.html file? [message #648693 is a reply to message #648083] |
Thu, 13 January 2011 21:48   |
Eclipse User |
|
|
|
The only way I know of doing this would be to write a custom XSL file to
generate the right kind of html output with images and the logs embedded
in it.
I'd be glad to help out with any changes that need to be done in the
SWTBot end to help with this, and put this as an out-of-the-box feature
in swtbot.
--
Ketan
ketan.padegaonkar.name | eclipse.org/swtbot | @ketanpkr
On 1/10/11 11:33 PM, Aparna wrote:
> I'm using swtbot for last 2/3 months and had a good experience using it.
> I use headless test framework and I get .html, .txt and .xml in
> 'results' folder. I often generate screenshots, logger messages to
> analyze failures. I got the screenshots in 'results' folder by
> specifying the folder name along with filename. I also generated logger
> output in 'results' folder by editing log4j.xml. But in this setup, all
> the things are scattered in different files.
> I want to have a consolidated html report in which I should see all the
> things (screenshots, logger messages and standard html output with test
> pass/fail status etc.) in a single file. That would be very easy to
> analyze the failure when you have lot many tests. Currently I've to
> first look at the .html. If there a failure then I've to open logger
> messages output file. I also need to open screenshots files side by side
> and then I can analyze the failure reason. It would be great help if all
> such things come in a single file.
>
> I looked at JUNIT.XSL, library.xml in
> org.eclipse.swtbot.eclipse.junit4.headles_xxxx folder. But doing changes
> in those files seems difficult.
> Is there any known standard method to get consolidated report including
> screenshots, logger output and html standard output?
>
|
|
|
Re: how to get screenshots, logger messages into results/${class-name}.html file? [message #649179 is a reply to message #648083] |
Mon, 17 January 2011 22:03   |
Eclipse User |
|
|
|
On 1/10/11 11:33 PM, Aparna wrote:
> I'm using swtbot for last 2/3 months and had a good experience using it.
> I use headless test framework and I get .html, .txt and .xml in
> 'results' folder. I often generate screenshots, logger messages to
> analyze failures. I got the screenshots in 'results' folder by
> specifying the folder name along with filename. I also generated logger
> output in 'results' folder by editing log4j.xml. But in this setup, all
> the things are scattered in different files.
> I want to have a consolidated html report in which I should see all the
> things (screenshots, logger messages and standard html output with test
> pass/fail status etc.) in a single file. That would be very easy to
> analyze the failure when you have lot many tests. Currently I've to
> first look at the .html. If there a failure then I've to open logger
> messages output file. I also need to open screenshots files side by side
> and then I can analyze the failure reason. It would be great help if all
> such things come in a single file.
>
> I looked at JUNIT.XSL, library.xml in
> org.eclipse.swtbot.eclipse.junit4.headles_xxxx folder. But doing changes
> in those files seems difficult.
> Is there any known standard method to get consolidated report including
> screenshots, logger output and html standard output?
>
So I just did another spike, turns out that grabbing the screenshot and
putting it in a report is not all that difficult of a deal. I've opened
a bug(https://bugs.eclipse.org/334604) to make the screenshot as part of
the generated junit-report.
--
Ketan
ketan.padegaonkar.name | eclipse.org/swtbot | @ketanpkr
|
|
|
|
Powered by
FUDForum. Page generated in 0.03871 seconds