Bug 58967 - use junit categories to exclude tests that need a gui
Summary: use junit categories to exclude tests that need a gui
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: Nightly (Please specify date)
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-04 08:53 UTC by benoit.wiart
Modified: 2016-02-04 21:42 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description benoit.wiart 2016-02-04 08:53:31 UTC
see https://github.com/junit-team/junit/wiki/Categories
this is only available for junit 4 tests and not for junit 3 suite style tests.
A test can be annotated with @Category(NeedGuiTests.class) and it will not be executed in headless mode
Also remove the AllTests#suite implementation as it's not compatible with junit4 tests
Comment 1 benoit.wiart 2016-02-04 08:54:22 UTC
PR https://github.com/apache/jmeter/pull/107
Comment 2 Philippe Mouawad 2016-02-04 21:42:55 UTC
Date: Thu Feb  4 21:11:13 2016
New Revision: 1728555

URL: http://svn.apache.org/viewvc?rev=1728555&view=rev
Log:
Bug 58967 : use junit categories to exclude tests that need a gui
#resolve #107
Bugzilla Id: 58967

Added:
    jmeter/trunk/test/src/org/apache/jmeter/junit/categories/
    jmeter/trunk/test/src/org/apache/jmeter/junit/categories/ExcludeCategoryFilter.java   (with props)
    jmeter/trunk/test/src/org/apache/jmeter/junit/categories/NeedGuiTests.java   (with props)
Modified:
    jmeter/trunk/test/src/org/apache/jmeter/control/TestOnceOnlyController.java
    jmeter/trunk/test/src/org/apache/jmeter/gui/util/TestMenuFactory.java
    jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTest.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/gui/TestHttpTestSampleGui.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PackageTest.java
    jmeter/trunk/test/src/org/apache/jorphan/test/AllTests.java
    jmeter/trunk/xdocs/changes.xml