database-connectiontestrigor

How to make connectivity to the mysql server from the TestRigor?


For my automation, different sets of customers are available in the database. We need to verify the frontend part like Active message for active customer and arrear message for arrear customer while login to the page. Here need to add a few modifications to the table level to check the different sets of customer messages. How can I make the connection to the MYSQL DB server and the tables, and How to add or insert the values. Is there any way to insert, update or alter queries in Test Rigor?


Solution

  • You can update the connection settings at runtime using the following variables:

    “connectionName:usernameJDBC”, “connectionName:passwordJDBC” and “connectionName:connStringJDBC”:
    Save value "user" as "connectionName:usernameJDBC". 
    Save value "pass12345" as "connectionName:passwordJDBC
    Save value "jdbc:mysql:host:port" as "connectionName:connStringJDBC"
    run sql query "select top 1 UserID, LastName, FirstName from Users;" using connection "connectionName"