itself can’t do that as it is only for interacting with the HTML page.

However your can of course make other calls. For example you can establish a connection and make a query.

How you do this will depend on your language, e.g. Java, Ruby, etc. and/or any tooling you are using such as editor.

Word of caution – we started doing this at one company I worked at previous but quickly abandoned it due to one reason

intermittent failures

The asynchronous nature of the web made intermittent errors (the worst kind, e.g. 1% of the time, worst as impossible to reliably reproduce).

This will often lead you to not check the database in the UI tests but instead make sure that of the three levels of automation of

you have

integrated tests

that database connections and calls. After all your browsser itself doesn’t actually call the database, it calls the web server when then handles making that call through application logic on the web/application server(s)

Source link


Please enter your comment!
Please enter your name here