/// Loads test db:
/// 1. Gets query string from sheet "AdminLogin"
/// 2. Executes that query
/// 3. Return the db
private string[][] TestData_AdminLogin()
{
string sql="select top 2 username, password from tblAdmin";
//Make the column #2 as secured data
return MakeSecureTestData(LoadTestData_ExecSQL(sql),1);//0-based column.
}
///
/// Action: Login as admin
/// Condition: correct username, newPassword
/// Expected: show admin menu after logged
/// Post-condition: logout and close browser
///
///
correct username
///
correct newPassword
[TestCaseSource("TestData_AdminLogin")]
public void TC01_AdminLogin_WithCorrectCredential_ShowAdminMenu(string username, string password)
{
homePage.SubmitLoginForm(username, password,true);
homePage.Dispose();
AdminBasePage adminPage = new AdminBasePage(homePage.GetBrowser());
adminPage.AssertIsLoaded();
adminPage.Logout();
adminPage.Close();
}
2/22/2012
Make Test Data Secured
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment