samedi 16 juin 2018

How should I define integration test cases?

So far what I have are unit tests in portlets for methods and classes that either have no dependencies or I mocked those dependencies.

My question comes for integration testing and functional testing (using Arquillian and Selenium, I guess). For example, how should I test the search for items by keywords and categories? For the assertion phase, how do I check if the search is correct if I don't know what state the database is in? I thought it would be best to use a test database (portal-test-ext.properties?) with test data (or data fixtures or whatever you call it), so that I know the status of the database and can decide which validations to put in, but I don't know if this would be the best approach, nor do I know what the best way to do it.

What would be the best way to do this?

Thanks!

Aucun commentaire:

Enregistrer un commentaire