text: A common task in GUI tests is to automate entering some data into forms. To properly test and verify such scenarios, it is often necessary to interact with the database backend from the test.
  As an example, let’s take the evaluation form on our website and assume we’d like to write a test for this. So whenever a visitor fills out the evaluation form, among other things the entered information is put into an SQL database.
  So filling out and submitting the form with some non-special values shall trigger a new row being added to the evaluation_requests table. For verifying this as part of the implementation of the the above information should be in the database step, we want to look into the MySQL database.
  The values we expect to show up in the database are taken from the Scenario. To have them accessible in the last step, we have to preserve them in the previous step; by putting them into the context’s userData space.
  The SQL query is based on the above table definitions. Having the tests running in an isolated test environment means we can safely assume nothing else than our own tests are writing to the database. Therefore, we can care about the most recent entry only (ORDER BY insertTime DESC LIMIT 1).
  The query() method executes the SQL statement, and provides the result set, pointing to the first row.
  In case you care about more than a single row, result.toNext() moves forward to the next row. Having this combined with result.isValid allows you to easily traverse through a result set: