[
https://issues.apache.org/jira/browse/ZOOKEEPER-1363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16183140#comment-16183140
]
ASF GitHub Bot commented on ZOOKEEPER-1363:
-------------------------------------------
GitHub user mfenes reopened a pull request:
https://github.com/apache/zookeeper/pull/375
ZOOKEEPER-1363: Categorise unit tests by 'test-commit', 'full-test' etc
ZOOKEEPER-1363: Categorise unit tests by 'test-commit', 'full-test' etc
Added new capability of defining test categories in test category
configuration files. Test category configuration files can contain list of test
file names and/or patterns. It is also possible to exclude tests from a test
category. Test categories are added to ${test.src.dir}/category directory.
Current test categories are defined so that they remained API compatible with
the previous build.xml in regards to how ‘ant test’ should be run (options are
the same and they behave the same way).
Func and Perf categories are added to keep the previous FuncTest and
PerfTest categories which were coded into the test file names.
Slow test category is added and contains tests which require more than 30
seconds to complete on a local developer machine.
Command ‘ant test -Dtest.quick=yes’ runs tests minus tests in the Slow
category.
Command ‘ant test -Dtest.category=<category name>’ runs tests from the
specified category.
It is possible to combine these two options to run a test category minus
the Slow tests.
Test category file name must match the name of the test category (e.g.
category/Commit).
List of excluded tests/patterns should be added to a .exclude file having
the same name as the category (e.g. category/Commit.exclude).
Added README.txt which describes how to run unit tests in detail.
Benefits:
- test categories do not need to be included in the test file names (a
test can be part of more than just one category).
- Slow test category is more flexible to exclude slow tests than the
hardcoded exclusion of “**/*HammerTest.java” in build.xml.
- new test categorization can also exclude test file names/patterns from a
category.
- test category can be added for a patch.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mfenes/zookeeper ZOOKEEPER-1363
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zookeeper/pull/375.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #375
----
commit cd51fe57cd839f49bf7babdae4ebded3c92f4b26
Author: Mark Fenes <[email protected]>
Date: 2017-09-08T15:00:29Z
ZOOKEEPER-1363: Categorise unit tests by 'test-commit', 'full-test' etc
----
> Categorise unit tests by 'test-commit', 'full-test' etc
> -------------------------------------------------------
>
> Key: ZOOKEEPER-1363
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1363
> Project: ZooKeeper
> Issue Type: Improvement
> Components: build, tests
> Reporter: Henry Robinson
> Assignee: Mark Fenes
> Labels: newbie
>
> As discussed on the list, it would be good to split the Java test suite into
> categories so that it's easy to run a small set of unit tests against a
> patch, and to leave Jenkins to run the full suite of stress tests etc.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)