This question is locked. New answers and comments are not allowed.
Hi all,
I have some classes as below (see in Code Block), and my questions are:
1. How can i create some more test methods in the
2. How can I create a new one more test methods in the
Thanks & Best regards,
Hoang Pham.
I have some classes as below (see in Code Block), and my questions are:
1. How can i create some more test methods in the
MainWindowUnitTest
test class with there are only several (not all) CodedStep functions invoked in each test method ?2. How can I create a new one more test methods in the
MainWindowUnitTest
test class with several functions in the MainWindow class and one (or more) functions created in the LoginDashboard class ? ( ex: the new test method in MainWindowUnitTest class is MainWindow_TestMethod_2(), and functions invoked in this new method are: MainWindow_CodedStep
, MainWindow_ManualFunction_01 , LoginDashboard_CodedStep1
and LoginDashboard_ManualFunction1
)namespace TestingOnDashboard_01
{
public class MainWindow : BaseWebAiiTest
{
[CodedStep(@"Open 'ManagementCombobox' drop down.")]
public void MainWindow_CodedStep()
{
// Open 'ManagementCombobox' drop down.
Applications.HPhamDashboardWpfShellexe.HPham_Dashboard.ManagementCombobox.OpenDropDown(true);
}
[CodedStep(@"Wait for Exists 'btn_LogOutDashboard'")]
public void MainWindow_CodedStep1()
{
// Wait for Exists 'btn_LogOutDashboard'
Applications.HPhamDashboardWpfShellexe.HPham_Dashboard.btn_LogOutDashboard.Wait.ForExists(30000);
}
public bool MainWindow_ManualFunction_01()
{
...
}
public int MainWindow_ManualFunction_02()
{
...
}
}
}
----------
namespace TestingOnDashboard_01
{
[TestClass]
public class MainWindowUnitTest : BaseWpfTest
{
[TestMethod()]
public void MainWindow()
{
}
}
}
------------------------------------------
namespace TestingOnDashboard_01
{
public class LoginDashboard : BaseWebAiiTest
{
[CodedStep(@"LeftClick on Item0Textboxview")]
public void LoginDashboard_CodedStep()
{
// LeftClick on Item0Textboxview
Applications.HPhamDashboardWpfShellexe.EmptyTitleWindow.Item0Textboxview.User.Click(ArtOfTest.WebAii.Core.MouseClickType.LeftClick, 35, 27, ArtOfTest.Common.OffsetReference.TopLeftCorner, ArtOfTest.Common.ActionPointUnitType.Percentage, ((System.Windows.Forms.Keys)(0)));
}
[CodedStep(@"Type 'hpham' into UserNameTextBoxTextbox")]
public void LoginDashboard_CodedStep1()
{
// Type 'hpham' into UserNameTextBoxTextbox
Applications.HPhamDashboardWpfShellexe.EmptyTitleWindow.UserNameTextBoxTextbox.SetText(true, "hpham", 10, 100, false);
}
public bool LoginDashboard_ManualFunction1()
{
....
}
}
}
------------
namespace TestingOnDashboard_01
{
[TestClass]
public class LoginDashboardUnitTest : BaseWpfTest
{
[TestMethod()]
public void LoginDashboard()
{
}
}
}
Thanks & Best regards,
Hoang Pham.