I have to design and implement tests for a project. In order to be able to re-use and automate the tests within several frameworks and tools (mostly for integration, functional and acceptance testing), I implemented specialized tests components, each used to perform actions and checks on specific functionalities.
For example, supposing an application working as follow:
- Receive JMS messsage
- Perform some business processing on these data
- Write data on external system
- Insert processed data in database
- Finally, Write a file on an archive server
I'll have one or more 'helpers', configured according to the environment, performing test actions with functions like:
- feedMessage() : send the JMS message to be consumed by our application
- checkDataWritten() : check data are correctly written on our external system
- checkDataInserted() : check the processed data has been inserted in database
- checkFileArchived() : check the archive file has been created properly
- And other functions to prepare and finalize my test
My test is then usable with various tools and context (using TestNG, JMeter, JUnit, etc.) without rewriting logic twice.
Is it viable/maintainable on the long term to implement a specialized test component for each functionalities? Isn't my test code/framework a parallel application in the end, which should be tested as well?