 Hello, welcome to the session on how to write the test cases in continuation with the previous topic. At the end of this session, students will be able to write the test cases for login functionality. Let us see what is test cases. A test case is defined as a set of actions executed to verify a particular feature or functionality of software application. The feature it may be a valid or invalid functionality. Test case is an indispensable component of software testing lifecycle that helps validate the application under the test. Let us see the difference between test scenario versus test cases. Test scenarios rather vague and cover a wide range of possibilities. Testing is all about being very specific. For test scenario, check the login functionality. The test scenario that contains the number of test cases. There are many possible test cases here. For example, test case 1 checks the results on entering the valid user ID and password. Test case 2 that checks the result on entering invalid user ID and password. Test case 3 that checks response when a user ID is empty and login button is pressed and many more. Let us create a test case for the scenario. Check the login functionality. Test the login functionality of any web application. This is one example by providing an email ID and password. Step 1. A simple test case for this scenario would be check the response when valid email and password is entered. So in order to execute the test case, you would need a test data. The test data for the test case is email ID and password. To execute any test case, data is required for the testing test cases. In order to execute a test case, a tester needs to perform a specific set of actions on the application under test. The steps need to be documented. To check the response when a valid email and password is entered, the steps are enter the email ID address, enter the password, then click on the sign in button. So this document is necessary as when the employee may leave the company or may not available while doing the testing application. There may be many reasons. So the documentation is very important. In the test execution time, the tester will check expected results against the actual results and assign a pass or fail test and assign a pass or fail status. To test the test case, we provide an email ID and password. The expected result, the login should be successful. Once we provide the valid username and password, actual result is also login was successful. Pass or fail status is pass. Apart from your test case, it may have the feel like preconditions which specify the things that must in place before a test can run. For our test case, a precondition would be to have a browser installed to have access to the site under the test. So for the previous test case, the precondition for this is the browser is installed. A test case may also include post conditions which specify anything that applies after the test case completes. A post condition would be time and data of login is stored in the database. This is the standard format for a test case. The column, first column that indicates test case ID for each test case is identified by a unique ID. So it is not compulsory to give the ID as tu01. It is as per your convenience, it may be test case 1, test case 2. So each test case ID is having a test scenario that is a description of test cases. Then test steps, so how to execute that test scenario, those steps are required. Then test data, after providing a test data, the expected results and actual result. After providing a test data, we will get actual result. So this actual result, it should match with the expected result. As in this case, the expected result is user should login to an application. So actual result is as expected we should get. Then the status is pass or fail. So if expected result and actual result if both are matches, then the status is pass. Then next test case ID, check the customer login with invalid data. So for this invalid data, the same steps we need to follow. The test data and expected results, the user should not login into the application. Because we are providing an invalid user name and password and the expected result and actual result it should match. So the test case is pass. Suppose by providing a valid, invalid user name and password and the login is successful, then the test case is fail. Let us pause the video for a while and write test cases for login functionality. Consider the Gmail account login functionality. After writing the test cases, resume the video. Let us see the how to write a test cases of login functionality. The test cases are written in a template. Normally the test cases are used to write in a Word file or in Excel file or in a test case tool management. I prefer to use Excel file to write the test cases. The test case, it should have the following fields, test case ID, test cases, the description of test cases, then priority based on the priority of the test cases, preconditions, input test data, the data that we are providing for the test case execution, and steps for execution of test cases, expected result and actual results, then pass or fail status and any remark or comments. So these are the basic fields that is required for writing the test cases. The first case for login functionality, test if user is able to login successfully. This is a high priority test case. The precondition for this test case is user must be registered already. The data for this is the correct username and correct password. The steps required enter the correct username and password on the respective fields and click on the submit or login button. Once after providing the valid username and password, the actual result, note down the actual result that you are observed after login button and the actual result, it should match with the expected results. So user must successfully login to the web page. If both expected result and actual results are matches, then the status is pass. So this is about the first test case. In the second test case, so you can provide the ID, there is a unique ID, test case 1, 2. Test if unregistered user is not able to login to the site. If the user is not registered for a particular web page, then he should not able to login. The priority for this test case is also first, that is A. So we can categorize the priority of test cases as A, B, C. So there is no precondition for this. The precondition it may be the browser is installed in your computer. Then input test data, so you provide a invalid username and invalid password. The steps are same. You have to enter the invalid username, password in a respective fields, click on the submit or login button. Expected result as proper error must be displayed and prompt to enter the login again. Because we are providing a invalid username and password, it should prompt an error message. The actual result it should note down and if both are same, expected result and actual result the particular test case is pass. So this is about the how to write a test cases. These are the references I refer. Thank you.