mercredi 30 décembre 2015

Unit testing of a very dynamic web application?

My business web application (PHP with HTML/Javascript) has lots of very different options (about 1000) which are stored in the database, so the users can change them theirselves. These options for example define if a button, tab or inputfield is visible, the validation of inputs and the workflow, like when e-mails should be sent.

My users can use any combination of these options, so I find it very difficult to write tests for all these situations. I have 100+ customers so writing tests for each customer is definetely not an option.

The problem is that some options work together. So while testing one option it's necessary to know the value of some other options. Ideally the tests should also be able to read the options-profiles for each customer. But that would almost be like rewriting the whole application, just for testing, which seems error-prone by itself.

Is it common in unit testing to read the database to get the test-data and options, or is that not a good idea?
How would you handle the situation I described ?

Aucun commentaire:

Enregistrer un commentaire