tested 0.9.0
Unit test runner with structured JSON output of results and resource usage.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
tested
This is a simple unit test runner with the ability to measure resource usage of each test. It can produce structured test result and resource data especially suitable for automated tests and performance/resource monitoring.
To use it, simply disable D's built-in unit test runner and call runUnitTests
. Your main()
should just return zero or be declared as void
and do nothing else:
version (unittest) {
shared static this()
{
import core.runtime;
Runtime.moduleUnitTester = () => true;
runUnitTests!app(new JsonTestResultWriter("results.json"));
assert(runUnitTests!app(new ConsoleTestResultWriter), "Unit tests failed.");
}
void main()
{
}
}
Alternatively, the latest version of DUB will automatically generate the necessary code by simply running "dub test" on your project. The package description just needs to have a dependency to "tested".
- Registered by Sönke Ludwig
- 0.9.0 released 11 years ago
- rejectedsoftware/tested
- MIT
- Copyright © 2013, rejectedsoftware e.K.
- Authors:
- Dependencies:
- none
- Versions:
-
0.9.5 2022-Aug-02 0.9.4 2013-Dec-13 0.9.3 2013-Dec-13 0.9.2 2013-Dec-11 0.9.1 2013-Dec-01 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
2220 downloads total
-
- Score:
- 0.6
- Short URL:
- tested.dub.pm