How to insert data using sql queries in existing project databse before executing a test?

Can we execute sql queries to insert/ update data in database ?

I have seen we can fetch data but I need to insert as well. As our environment is new and need some prerquisite in database.

1 Like

You can use @BeforeTestSuite listener. In the listener you can use jdbc connection to insert the data