webdriverio-boneyard / wdio-junit-reporter

A WebdriverIO v4 plugin. Report results in junit xml format.
http://v4.webdriver.io
MIT License
11 stars 42 forks source link

use fullTitle of a suite in reporter #79

Open sherlock1982 opened 6 years ago

sherlock1982 commented 6 years ago

I have some nested describes in mocha and in junit reporter they look ugly because reporter takes name of inner describe only. Here's suggested patch to take fullTitle of a suite so in report it will look nicer. We can make it optional if you want no to break anything.

christian-bromann commented 6 years ago

they look ugly

Can you provide a screenshot of how the logs look before and after?

sherlock1982 commented 6 years ago

I have two specs now:

describe('PBX', () => {
    describe('Validations', () => {
        it('should validate something important', () => {

        })
    })

    describe('Editor', () => {
        it('should edit something important', () => {

        })
    })
})
describe('Settings', () => {
    describe('Validations', () => {
        it('should validate something important', () => {

        })
    })

    describe('Editor', () => {
        it('should edit something important', () => {

        })
    })
})

This is before:

image

This is after:

image

christian-bromann commented 6 years ago

@sherlock1982 any updates?

christian-bromann commented 6 years ago

ping @sherlock1982

dbashford commented 6 years ago

FWIW, I've just got this copied into our codebase as we need it. Can hopefully get this work incorporated at some point.

arstanton commented 5 years ago

Any progress with this? As it is now, it's encouraged only using one describe block (because only the inner most block is visible), which makes it harder to include beforeEach(), afterEach(), etc..., hooks.