Releases: konecnyjakub/mytester
My Tester 5.0.0
A new version of My Tester is out. It is no longer possible to pass string to parameter $value of assertions assertCount and assertNotCount. It is now possible to skip a test method after it was started.
But this version's highlight is the ability of automated tests runner and Nette DI container extension the ability to generate coverage reports. For now supported formats are Cobertura and text, more options and supported formats might be added in the future.
Automated tests runner now supports extensions, they can add callbacks to certain events. They replace the previous system of adding events through Nette DI container extension.
For complete list of changes since previous version, see CHANGELOG.md.
My Tester 4.2.0
A new version of My Tester is out. It adds assertions assertMatchesRegExp and assertArrayOfClass. Strings in error messages for assertions are now in quotes, array's content is now displayed.
For complete list of changes since previous version, see CHANGELOG.md.
My Tester 4.1.0
A new version of My Tester is out. It adds assertions assertGreaterThan, assertLessThan and assertOutput. Tests can be marked as incomplete with method TestCase::markTestIncomplete().
Passing string to parameter $value of assertions assertCount and assertNotCount is now deprecated, it will not be possible in the next major version. It was never meant to possible to do that.
For complete list of changes since previous version, see CHANGELOG.md.
My Tester 4.0.0
A new version of My Tester is out, it is only for PHP 8.2 and later. There are a lot of internal changes/improvements (using new PHP features, reorganization of code), some of them allowed implementation of new features.
One of new features of the automated tests runner is the ability to report percentage of code coverage, future versions might expand code coverage functionality (e. g. generating a full report in Clover XML or HTML). The automated tests runner also now automatically removes .errors files previous runs and reports number of passed tests.
The option to mark tests in TestCase as supposed to fail was removed, the code was too complex and hard to maintain. On the other hand, TestCase now has a new assertion throwsException. There are also changes to result of test methods in TestCase: if the method has at least 1 parameter but its data provider provides none, it is now skipped and if it does not perform any assertions, it is marked as passed with warnings.
For complete list of changes since previous version, see CHANGELOG.md.
My Tester 3.0.0
New version of My Tester is out. It is only for PHP 8.0 (and later) and Composer 2. It removes all deprecated stuff but also add a few new features/improvement for existing features. There is also a change in namespace for PHP attributes.
Most of improvement are in automated tests runner. One of them is using Composer's autoloader by default. That means that you need one less package to use it because it makes use of new api from version 2. But of course My Tester will still use nette/robot-loader if it is installed. It is also possible to colorize automated tests runner output but it is not enabled by default. Check out README.md for details.
Complete changelog for this version follows:
- BC break: removed support for *.phpt files
- BC break: removed Assert, Environment
- BC break: removed data and testSuit annotations
- allowed customization of finding test suites in automated tests runner
- BC break: moved PHP attributes to namespace MyTester\Attributes
- automated tests runner now uses Composer's autoloader, package nette/robot-loader is optional
- BC break: marked Job as final
- automated tests runner's output can be colorized
- dropped support for Composer 1
- raised minimal version of PHP to 8.0
- BC break: removed support for phpDoc annotations
My Tester 2.1.0
New version of My Tester is out. It brings a couple of new features but also more deprecations and possible BC breaks. The biggest deprecation is whole class Environment. Most of its functionality is covered by Tester and TAssertions now (though it is often marked as internal) and the class will be removed in next major version.
Next highlight of this release is new annotation @dataProvider. It is more powerful than previous data which is now deprecated. Check out README.md for details.
We also now use test suite instead of test suit whenever possible. Some methods were renamed without regard to backwards compatibility but the testSuit annotation will continue to work until next major version.
Complete changelog for this version follows:
- allowed customization of test suite creation in automated tests runner
- made Job::$name, Job::$params and Job::$shouldFail readable
- deprecated Environment
- possible BC break: only public methods in TestCase whose name starts with test are now considered tests
- added @dataProvider annotation, it should be used instead of data
- possible BC break: renamed method TestCase::getSuitName() to getSuiteName() and Tester::$suits to $suites
- deprecated annotation testSuit in favor of new testSuite
My Tester 2.0.1
This release fixes a couple of issues with PHP attributes added in previous version. Firstly, all attribute classes were public api as they should access from user code. Secondly, default value for attributes was changed to true. This is not a BC break as the previous default value (null) prevented attributes from being used. Lastly, the attributes are now documented in README.
My Tester 2.0.0
After 4 years of development, My Tester 2 is finally out. It contains quite a lot of changes, a few new features were added and some features/options were removed or deprecated. It also works only on PHP 7.4/8.0. Next major version will remove deprecated stuff and will most likely support only PHP 8.
Complete changelog for this version follows:
- BC break: removed Runner
- simplified output, errors are now printed to tests_folder/job_name.errors
- BC break: removed parameter $successText of method Assert::tryAssertion()
- automated tests runner exits with 0/1 depending on whether all tests passed
- BC break: removed methods Environment::testStats(), Environment::getOutput(), Environment::checkFailed()
- added option to mark test method as supposed to fail
- removed option to save the output to file(s)
- BC break: removed second parameter of Environment::printLine()
- added script for automated tests runner, see README
- BC break: parameter $params in Job::__construct() must always be an array
- raised minimal version of PHP to 7.4
- marked some classes as final
- added event onExecute to Tester
- dropped support for Nette 2.4
- deprecated Assert
- BC break: added constructor for TestCase
- BC break: marked methods Environment::incCounter(), Environment::resetCounter(), Environment::addSkipped() as internal/private
- automated tests runner now supports *Test.php files, they should be used instead of *.phpt files
- BC break: marked TestsRunner as internal
- removed support for running from browser
- PHP 8 attributes can be used instead of phpDoc annotations
My Tester 1.1
Version 1.1 is out. Starting with this version, My Tester will not be distributed as .phar file anymore. Just install it via Composer.
New features
- added option to skip a test if current sapi is different
- added event onExecute to TestsRunner
Enchantments
- the environment for nette di extension is now set up in TestsRunner::execute()
- improved deprecation message for Runner
- TestsRunner::execute() now returns whetever the tests failed
My Tester 1.0
Version 1.0 is finally out! There is quite a lot of changes, some of them are just behind the scenes but other ones are very visible. A couple of new features was added, some code was refactored. I tried to preserve backwards compatibility as much as possible but there are a few BC breaks. Anyway, here is the full changelog:
Changes in dependencies
- added dependency on tracy/tracy
BC breaks
- Environment::testStats() takes 2 paramaters now, second one is name is Tracy's timer
- TestCase::getJobs() now return array of Job
Deprecated stuff
- Runner was deprecated and will be removed completely in next major version
New features
- Assert::tryAssertion() now supports custom messages for succes and failure
- added new assertion notCount
- added option to skip test if an extension is not loaded
- added methods setUp and tearDown to TestCase which are called before/after each test method
- added methods startUp and shutDown to TestCase which are called at start/end of the suit
- added integration for nette/di
Enchantments
- improved success and failure messages for some built-in assertions
- all items of array are now evaluated in TestCase::checkSkip()
- version of My Tester and PHP is shown at start now
- first parameter of Runner::addJob() can be instance of Job now
- automated tests runner now sets up the environment himself
- showed total run time at the end of script