T E S B O

Tesbo

Data driven

1. Global variable

1.1 Global variable with declare data set name

DataSet:
{
"Credentials": {
"travelUser": "admin@phptravels.com",
"travelPass": "demoadmin",
}
}

Test: verify Data Set functionality
#All #dataSet
DataSet: Credentials
Step: Open URL 'https://www.phptravels.net/admin'
Step: pause 2 sec
Step: Enter {travelUser} in to @Email_Box
Step: Enter {travelPass} in @Password_Box
End

1.2 Global variable without declare data set name

DataSet:
{
"Credentials": {
"travelUser": "admin@phptravels.com",
"travelPass": "demoadmin",
}
}
Test: verify Data Set functionality without declare data set
#All #dataSet1
Step: Open URL 'https://www.linkedin.com/login?trk=guest_homepage-basic_nav-header-signin'
Step: Enter {DataSet.Credentials.travelUser} into @emailTextBox
Step: Enter {DataSet.Credentials.travelPass} into @passwordTextBox
Step: Click on @signInTextBox
End

2. Data set with excel file

  • Support Only “.xlsx” file

2.1 Excel file with default sheet

DataSet:
{
"GmailUsers": {
"excelFile": "E:\Project\Tesbo\NewTB\Tesbo-Skeleton\Tesbo-Skeleton\src\test\Resource\GmailData.xlsx"
}
}

Test: verify Data Set functionality with excel file
#All #dataSet
DataSet: GmailUsers
Step: open url 'https://accounts.google.com/signup'
Step: Enter {firstName} on @FirstName
Step: Enter {lastName} on @LastName
Step: Enter {userName} on @UserName
Step: Enter {password} on @Password
End

2.2 Excel file with number of sheet

  • Get data from first sheet from excel
  • Sheet number start with zero [0] index
DataSet:
{
"LinkedinUsers[1]": {
"excelFile": "E:\Project\Tesbo\NewTB\Tesbo-Skeleton\Tesbo-Skeleton\src\test\Resource\GmailData.xlsx"
}
}

Test: verify Data Set functionality with specific sheet number from excel file
#All #dataSet
DataSet: LinkedinUsers[1]
Step: Open URL 'https://www.linkedin.com/login?trk=guest_homepage-basic_nav-header-signin'
Step: Enter {userName} into @emailTextBox
Step: pause 1 sec
Step: Enter {password} into @passwordTextBox
Step: Click on @signInTextBox
End

3. Use multiple data set

DataSet:
{
"Credentials": {
"travelUser": "admin@phptravels.com",
"travelPass": "demoadmin",
}
"LinkedinUsers[1]": {
"excelFile": "E:\Project\Tesbo\NewTB\Tesbo-Skeleton\Tesbo-Skeleton\src\test\Resource\GmailData.xlsx"
}
}

Test: verify Data Set functionality with multiple data set
#All #dataSet
DataSet: LinkedinUsers[1]
Step: Open URL 'https://www.linkedin.com/login?trk=guest_homepage-basic_nav-header-signin'
Step: Enter {userName} into @emailTextBox
Step: pause 1 sec
Step: Enter {DataSet.Credentials.travelPass} into @passwordTextBox
Step: Click on @signInTextBox
End

You can find a all similar example from Tesbo-Skeleton as well

Powered by BetterDocs

Leave a Comment