Search code examples
testingtestcase

Test Case Preparation


I am a newbie to testing field. I know that test cases are the conditions to fulfil any client requirements i.e. the test conditions we need to fulfil the requirements. I need some idea how to formally write a test case. Can anyone give me any idea of writing the test cases.

Assume an example of login page. i want to write the test case for a login screen. Please provide a pattern to do so.

Any other example is also favourable.


Solution

  • Hey.
    BDD approach is also nice way to express behavior. Simple Given-When-Then lets you structure your idea. For example:

    Scenario: Login as Admin  
    Given: Login Page is loaded  
      And loginInput field is present  
      And loginPassword secure filed is present  
      And locinSubmit button is present  
    When: User puts adminLoginName into loginName field  
      And User puts adminLoginPassword in loginPassword secure field  
      And User clicks loginSubmit button  
    Then: LoginPage is closed  
     And MainPage is loaded  
     And AdminPanel is visible