maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor Sidochenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SUREFIRE-1227) The Description argument RunListener#testRunStarted(Description) doesn't include test methods
Date Wed, 10 Feb 2016 03:37:18 GMT

    [ https://issues.apache.org/jira/browse/SUREFIRE-1227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15140251#comment-15140251
] 

Victor Sidochenko commented on SUREFIRE-1227:
---------------------------------------------

[~tibor17]
It is important for me. I`m using (in [allure-cucumber-jvm-adaptor|https://github.com/allure-framework/allure-cucumber-jvm-adaptor])
description with all its childern in testRunStarted to find out parents for descriptions passed
from testStarted. 

And one question. Junit (since 4.12) has uniqueId parameter as argument to create description
and cucumber-jvm uses it to find out needed objects.
In surefire-plugin 2.18.1 Description wich comes as parameter to testRunStarted has different
uniqueIds than in testStarted/testIfnored. This behaviour happens only if RunListener passed
from pom.xml as surefire-plugin configuration parameter. If it set from junit test - all fine
and uniqueIds are valid.
So if you will decide to return back child descriptions, could you look at this problem? [Details|https://github.com/cucumber/cucumber-jvm/issues/959].

> The Description argument RunListener#testRunStarted(Description) doesn't include test
methods
> ---------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1227
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1227
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.19.1
>            Reporter: Jiri Locker
>         Attachments: maven-surefire-run-listener.zip
>
>
> In Surefire 2.19 the Description passed to testRunStarted() is a test run description
and has 2 levels of children (test classes > test methods). The top level Description's
testCount property is equal to the number of test methods in all test classes that are going
to be run. When dumping the description tree it may look like this:
> {noformat}
> Description: ~ null (6)
> Description: ~ ~ io.github.yurloc.example.runlistener.MyFirstTest (2)
> Description: ~ ~ ~ testMethod1(io.github.yurloc.example.runlistener.MyFirstTest) (1)
> Description: ~ ~ ~ testMethod2(io.github.yurloc.example.runlistener.MyFirstTest) (1)
> Description: ~ ~ io.github.yurloc.example.runlistener.MySecondTest (4)
> Description: ~ ~ ~ testMethodA(io.github.yurloc.example.runlistener.MySecondTest) (1)
> Description: ~ ~ ~ testMethodB(io.github.yurloc.example.runlistener.MySecondTest) (1)
> Description: ~ ~ ~ testMethodC(io.github.yurloc.example.runlistener.MySecondTest) (1)
> Description: ~ ~ ~ testMethodD(io.github.yurloc.example.runlistener.MySecondTest) (1)
> {noformat}
> However in Surefire 2.19.1 the leaf descriptions of test methods are missing:
> {noformat}
> Description: ~ null (2)
> Description: ~ ~ io.github.yurloc.example.runlistener.MyFirstTest (1)
> Description: ~ ~ io.github.yurloc.example.runlistener.MySecondTest (1)
> {noformat}
> Because of this I am unable to access the total test count, which I use to calculate
ETA of the test run finish. I seem that this change of behavior was introduced by fixing SUREFIRE-1187.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message