Using Selenium Webdriver how to connect remote database and run test cases
from local machine through eclipse
I am using selenium web driver java built , editor is eclipse. For testing
one of our website I am using Data driven testing by fetching data from
MySQL database.
I dumped the development server database to my local machine and installed
that dumped data in my machine xampp and able to connect to database and
proceed through the testing process.
To connect to my local machine database i am using this connection string
String url1 ="jdbc:mysql://localhost:3306/databasename";
String dbClass = "com.mysql.jdbc.Driver";
Class.forName(dbClass).newInstance();
Connection con = DriverManager.getConnection(url1, "root", "");
Statement stmt = (Statement) con.createStatement();
Now I need to connect to connect to our original development server
database which is in remote server.
Can any one suggest me how to connect to the remote server database and
what changes are needed to be done in the connection string ? what to put
in the host name ? and how I can run my test cases from my local machine
while connecting to remote server database.
Please provide some suggestion
No comments:
Post a Comment