bodar/yatspec

Create Overview Page for Test suite

nbarrett opened this issue · 2 comments

Hi Yatspeccers! I've just pressed Yatspec into use on my current project and it's looking pretty good. One thing I would really like though would be the creation of an HTML overview document that allows all of the individual HTMLs to be navigated down to, as they are all created in the namespace of the test classes. I've also got screenshots confugured and they work great. See example layout of my reports:

image

Hi Nick,

Have you seen the HtmlIndexRenderer? It sounds similar to what you are
after, If I remember correctly.

I haven't used it in a while so don't remember what it looks like, but I
think if you use the interface WithCustomResultListeners, you can hook in
the HtmlIndexRenderer or create your own.

Alex
On 5 May 2015 11:24, "Nick Barrett" notifications@github.com wrote:

Hi Yatspeccers! I've just pressed Yatspec into use on my current project
and it's looking pretty good. One thing I would really like though would be
the creation of an HTML overview document that allows all of the individual
HTMLs to be navigated down to, as they are all created in the namespace of
the test classes. I've also got screenshots confugured and they work great.
See example layout of my reports:

[image: image]
https://cloud.githubusercontent.com/assets/626941/7470905/cc954c82-f318-11e4-9e3c-76112dddaf0d.png


Reply to this email directly or view it on GitHub
#19.

Hey Alex, that looks exactly what I need actually and seems to work straight out of the box! I've implemented in my test superclass as follows:

@Override
public Iterable<SpecResultListener> getResultListeners() throws Exception {
    final String testName = this.getClass().toString().split(" ")[1].replaceAll("\\.", File.separator);
    return Arrays.asList(new HtmlWithScreenShotResultListener(testName), new HtmlIndexRenderer());
}

The only trouble I'm having now is running it using the parallel multi-threaded config of the maven-surefire-plugin, so having to run single-threaded for the time being.... But this is a real bonus.