java - How distinguish from which test suite was junit test run in case the same tests are run more times? -



java - How distinguish from which test suite was junit test run in case the same tests are run more times? -

i have junit main test suite. suite contains many suites - each testing configuration

@runwith(progresssuite.class) @suiteclasses({ simpletest.class, abouttest.class, cdh4_jdbc_testsuite.class, cdh5_jdbc_testsuite.class, cdh4_metastore_testsuite.class, cdh5_metastore_testsuite.class, cdh4_jdbc_kerberos_testsuite.class, cdh5_jdbc_kerberos_testsuite.class, cdh4_metastore_kerberos_testsuite.class, cdh5_metastore_kerberos_testsuite.class, }) public class testsuite { }

suites each testing configuration contains same test cases, contains different setupclass() , teardownclass() methods

@runwith(suite.class) @suiteclasses({ perspectiveswitchtest.class, newfolderfromtoolbartest.class, renamefolderfromtoolbartest.class, renamefilefromtoolbartest.class, openfilepropertiesfromtoolbartest.class, openfolderpropertiesfromtoolbartest.class, deletefilefromtoolbartest.class, deletefolderfromtoolbartest.class, copypastefolderfromtoolbartest.class, copypastefilefromtoolbartest.class, cutpastefolderfromtoolbartest.class, cutpastefilefromtoolbartest.class, }) public class cdh4_jdbc_kerberos_testsuite { private static swtworkbenchbot bot = new swtworkbenchbot(); private static addnewecosystemnavigator addnewecosystemnavigator; private static ecosystemconfigurationloader ecosystemconfigurationloader; private static ecosystemconfiguration ecosystemconfiguration; private static genericnavigator genericnavigator; @beforeclass public static void setupclass() { bot = new swtworkbenchbot(); addnewecosystemnavigator = new addnewecosystemnavigator(); ecosystemconfigurationloader = new ecosystemconfigurationloader(); genericnavigator = new genericnavigator(); ecosystemconfiguration = ecosystemconfigurationloader .getdefaultcdh4jdbckerberosecosystemconfiguration(); addnewecosystemnavigator.addnewecosystemmanually(bot, ecosystemconfiguration); } @afterclass public static void teardownclass() { genericnavigator.closedialogwindow(); addnewecosystemnavigator.discardecosystem(bot, ecosystemconfiguration); } }

i using jenkins , tycho building tests. when run test suite , tests fails, not able distinguish on configuration tests failed. in jekins can see info e.g newfolderfromtoolbartest runned 8 times (3 times failed, 5 times passed). of course of study able required info log, time consuming.

is there way how required information? e.g utilize different test structure, utilize different jenkins plugin, renamed method dynamically if possible etc? ideas please? lot

you create test classes abstract , have each configuration subclass

public class cdh4newfolderfromtoolbartest extends abstractnewfolderfromtoolbartest{ //... }

then in suite phone call specific test classes

runwith(suite.class) @suiteclasses({ cdh4perspectiveswitchtest.class, cdh4newfolderfromtoolbartest.class, cdh4renamefolderfromtoolbartest.class, cdh4renamefilefromtoolbartest.class, //...etc }) public class cdh4_jdbc_kerberos_testsuite { //same before }

i advocate instead of reconfiguring in each subclass since @beforeclass , @afterclass called 1 time if set in suite.

java junit jenkins automated-tests tycho

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -