TestProject Forum
Powered by leading experts in the test automation community

How to use postgreSQL add-on in TestProject

Can anyone please educate me on how we can use PostgreSQL addon in test project.
I have gone through docs but not getting how to do it.

Thanks in advance.

Hello @thesudhindra
It is pretty simple.
If you did not change anything while installing the Postgress you can keep the defaults.
Host - can be localhost if it locally on your network so you can fill in
Post - if in setting up the server you kept the default port write down 5432
Username - the username you set up while creating the database.
Password - the password you set up while creating the database.
DbName - the name of the database you are querying.
Query - and the SQL query, this is usual SQL like SELECT * FROM DbName and so on…

The Query is the most important part, for that you need to use the right SQL syntax.

Yes, that I did.
Suppose if I fetched the user name from DB, then I’m struggling with getting and storing that username string to use in the next step as an input.

The result of the query will be saved as an output parameter.
You can save it in a test/project parameter and re use it anywhere you want.