Timeline for How to unit test models in MVC / MVR app?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 2, 2014 at 15:08 | comment | added | Robert Harvey | As with many things in computing, it depends. Some people use a lightweight alternative database like SQLite as a stand-in, but that of course does not substitute for actual integration testing with a real database. I personally prefer not to test mundane operations like CRUD calls at all. | |
| Jun 2, 2014 at 14:53 | comment | added | rgb | Hey Robert thanks for your thoughtful answer. However, I've already got a good test setup for the backend that does not involve the front-end at all. What my questions asks if specifically how to test the model components of my back-end. Meaning this: does it make sense to inject a testing layer between my model and my database? Or is it better to let the models work on a real database with pre-defined test data inserted into it? | |
| May 29, 2014 at 19:48 | comment | added | Robert Harvey | See my update... | |
| May 29, 2014 at 19:45 | history | edited | Robert Harvey | CC BY-SA 3.0 |
added 632 characters in body
|
| May 29, 2014 at 19:27 | comment | added | rgb | Wait, so the Service layer would be the test? Or would the test work on the service layer directly? | |
| May 29, 2014 at 16:15 | history | answered | Robert Harvey | CC BY-SA 3.0 |