Author: marza
Publication Date: 6/26/2017 15:17
e-Spirit’s product management module development team publishes their internal test utilities on GitHub for everybody. There is a comprehensive README which explains how to use these test tools inside a Java project together with JUnit, Hamcrest and Mockito.
Feel free to contribute to this project in form of issues like bug reports or feature requests as as well as pull requests:
Tags: developer, developer_experience, release, testing, tools
Comments
1 comment
We decided internally to not continue the test tools library and discourage its usage. Therefore, we removed the repository from github and (now) also removed all dependencies to the library. The main reason behind this decision is, that extensive mocking of FirstSpirit classes (or any other product or framework) gets dangerous pretty fast, because of the programmer's tendency to make assumptions about internals. Those internals can be subject to changes at any time. Or the assumptions can be wrong from the beginning on. This leads to a false feeling of safety.
All in all, we want to encourage everybody to instead do the following:
* Inject dependencies to FirstSpirit classes where necessary to improve testability of your own code independently from other's code
* Write integration tests that use the real FirstSpirit API directly, for example with a test server instance
We had a good experience writing tests this way - let us know about your experience and feel free to report any problems .. or challenges you had :smileyhappy:
Regards,
Hannes
Please sign in to leave a comment.