Database Validation upon executing a SST script

Asked by pratik shah on 2013-02-01

Currently there is no mechanism built in to connect to a database and verify a CRUD operation that a SST test script may produce. Rightfully so, its a security risk if someone fails to use it with care. With that said, how are python SST users validating database values after a script finishes executing?


Login -> navigate to Roles Page -> add a user -> ** verify user in db exists by a select query **

Corey / Leo and company, is it completely out of line to try and build something that helps users validate CRUD operations after running the SST script? Of course it would have limitations, guards etc.

Thoughts, Suggestions?

Question information

English Edit question
selenium-simple-test Edit question
No assignee Edit question
Solved by:
Leo Arias
Last query:
Last reply:
Best Leo Arias (elopio) said : #1

I've used dbunit before. That's Java.
We gave it a good try, but I hate that approach. You end up combining two different layers in the same test, and in my opinion that's not right. The first part: navigate -> add {something} is a user test. For a ux point of view, a user should also be able to do: navigate -> review {something}. So you should be able to do the whole test on a high level of abstraction without accessing the database directly.
If you want to check the crud operations of your system, I think that should be unit tests, hopefully with a test double for the database so the tests can run fast. And hopefully you will be using a database that you can trust it's been tested so you don't have to get in there ever.

Anyway, that's just an opinion. For a different application it might be worth it. In our case, we were working on a model driven website, so the ui was actually stored in the database and it didn't sound like a big cross of layers. But I would do it differently now.

pura vida.

pratik shah (pratik-shah) said : #2

Thanks Leo, great feedback.

pratik shah (pratik-shah) said : #3

If anyone else has input I'd love to hear it, otherwise I'll close this in a week.

pratik shah (pratik-shah) said : #4

Thanks Leo Arias, that solved my question.