Open seyfer opened 7 years ago
Hi
The story you shared is not very relevant. I use Atoum for some projects, and have sometimes race conditions between tests like the author described.
The author missed to tell that Atoum is designed to run tests in a test class in parallel, by running several PHP processes. Maybe he was not aware of the available solutions, or maybe they were not implemented at time of writing (2012). If you have some race conditions, I think this is interesting to know because this might be an opportunity to rewrite some parts of the project or its tests in a better way. If for some reason you cannot avoid such race condition you can:
-mcn 1
@engine inline
on a test class or a test method to not run in a separate process (and de-facto run those annotated tests one by one)I switched from PHPUnit to Atoum and I found tests really more easy to write mostly because in Atoum there is no need to mess with static methods to setup the test class or a test method.
You may have a look on this feedback:
https://glpi-project.org/glpi-now-uses-atoum-for-its-unit-tests-2/
In my opinion use of Autom test framework doesn't add any benefit to the library and even creates some inconvenience. Why? Because PHPUnit is de facto standard for testing in PHP world. And most of the developers know PHPUnit and only a few enthusiasts know Atoum. This leads to a situation when some contributor wants to add some code to the library, he is much less likely to write a test with his pull request. Because most of the potential contributors don't know Atoum, it adds unnecessary learning curvy and actually prevents people from writing tests with their contributions.
To make my point stronger, I will provide a link with libraries popularity and activity comparison. https://php.libhunt.com/project/atoum/vs/phpunit And here is a story about the negative experience with Atoum and returning to PHPUnit http://technosophos.com/2012/01/25/atoum-different-unit-testing-framework-php.html
I would like to read thoughts from other contributors and from the author @Ph3nol. If everyone agrees, I would start a new branch for a migration process to PHPUnit.