Data Driven Framework using MYSQL Database:
--------------------------------------------------------------------
Data Driven Framework :
To maintain the data in a third party resource file and use the data to execute the tests in Selenium WebDriver.
xlsx
xls
xml
database-MYSQL
Data is not hardcoded in the testcases.
public void login()
{
driver.findElement(By.xpath()).sendKeys("Selenium"));
driver.findElement(By.xpath()).sendKeys("########"));
}
public void login(String uname,String pword)
{
driver.findElement(By.xpath()).sendKeys(uname);
driver.findElement(By.xpath()).sendKeys( pword);
}
login("Selenium","########");
MYSQL:
is mainly useful to store the data in tables where it contains rows and columns.
SQL stands for Structured Query languages, where we write queries to manipulate the data.
Relational database
Open Source
Steps:
Downloading & Installation of MYSQL is provided in our blog
http://total-qa.com/mysql-database-te...
Port:
3306
username & password:
root/root
Start/Stop the Server:
Open services.msc and click on MYSQL57
Workbench:
To connect to the server and view the contents of the server we have already an GUI which is provided by MYSQL
called Workbench
Maven dependencies:
mysql-connector-java
https://mvnrepository.com/artifact/my...
mysql-connector-java
MYSQL:
schema/database: testdb
tables: emp & dept
emp:
rows & cols
col1[1] col2[2]
row1
row2
In questa pagina del sito puoi guardare il video online Database Testing MYSQL using Selenium Webdriver,Testng,Java,JDBC,Data Driven Framework,@DataProvider della durata di ore minuti seconda in buona qualità , che l'utente ha caricato total-qa 10 September 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 6,418 volte e gli è piaciuto 125 spettatori. Buona visione!