COMP-10066 – Assignment 5

COMP-10066 – Assignment 5 Mark Yendt and Karen Laurin, Mohawk College 2020
Complete the following assignment and submit electronically using the assignment folder in MyCanvas. See the course Calendar for the exact date and time of the submission. This assignment must be done individually.
In this lab you will be combining some of the tasks that you completed in Assignment #2, Assignment #3 and Assignment #4.
 In Assignment #2, you used the Katalon Web Testing automation tool to create some tests for testing a web site.
 In Assignment #3, you investigated creating good quality code and writing comments.
 In Assignment #4, you used Visual Studio and C# to create some unit tests for a library of C# methods.
In this assignment you will be extending the web-site automation to use multiple browsers and create some tests in C# using the Selenium Web Driver that can be run within Visual Studio. The Selenium web-tests can be developed using the Katalon Recorder and then imported into Visual Studio as MS Test Cases.
You have been provided with starting code for the lab that will control the starting and shutting down of various browsers (Chrome, FireFox, Edge and Internet Explorer). This has been tested on Windows 10 and should work on other systems as well (also tested on Windows 8). A TestLoginAdmin has been included with the starting code.
Task 1: Setting Up Your System
Download the starter code for this assignment from the Assignment #5 folder on MyCanvas. There are two downloads in the Assignment #5 folder.
a. This file has the four drivers that are used as part of the driver automation.
b. In the lab at Mohawk create a folder on the D: drive called drivers (D:\Drivers). Extract the zip file contents to that folder.
c. At home, unzip this folder to a known location (for example, C:\Driver) and update the path in the code to match this location. The variable to be updated is DRIVER_LOCATION.
 You may have to download the correct driver for your web browser. See section below called “Download the Web Drivers” to ensure you are getting the correct driver for your system.
d. Add the location to the Path Environment Variables.
 Go to the Computer icon (This PC) on the desktop, right click and select Properties.
 Go to the Advanced System Settings/Environment Variables
 Add the location of the drivers to the Path.
 Save these settings.
a. This file has the starter files for the Visual Studio project. Unzip this to a location of your choice.
b. Start Visual Studio and open the project
c. Select the web browser you have set up the driver for your system by uncommenting the correct BROWSER variable line. Ensure all other instances of the BROWSER variable are commented.
d. Test the Project (Test Menu/Run/All Tests)
 If the TestLoginAdmin test case fails, there is something wrong with the configuration for the web browser you selected.
Download the Web Drivers
If the provided drivers ( do not work, you will need to download the appropriate drivers for the browser versions on your local computer.
You will need to find the version of each web browser installed on your computer. This can be done through the settings or about page in the web browser.
Download the correct version for each of the web browsers using the following links:
 Chrome Driver:
 Firefox Driver:
 Edge Driver:
 Note, you will have to change the name of the file to MicrosoftWebDriver.exe
Task 2: Building the Test Cases
You will now add test cases to the project. The unit testing in this environment is a little different then the unit tests in Assignment #4 in that the order of commands and tests are important. Also it is not possible to have tests run at the same time since you will be creating and deleting an account from within the session. To minimize these issues you will need to have each test method run from within a single [TestMethod] method for the entire set of tests – DO NOT create any additional methods that are marked with [TestMethod].
 TestLoginAdmin
 This test case is provided.
 TestCreate
 Write a test case that will create a regular (non-admin) user (First_Last / Strong password), confirm that the user is created and that the user can log-in. You may want to re-use the testLoginAdmin code above.
 TestDelete
 Delete the account you created above. Do this using the open command.
 TestCityDirectory
 Write a test that will confirm a City has the suggested number of matches by confirming the city and province data for each entry. For example the City of Calgary, AB has {4} entries. Your code needs to confirm that 4 entries exist with the city of Calgary, AB. This method must be written in a general way so that it can be used for any City. In your code show that this works by testing 4 different cities of your choice. Provide a variety in the number of entries to prove your method works in different cases.
All of the above methods must be added to the location shown in the starting code for the project. None of the other methods should have the [TestMethod] indicator above them.
public void RunAllTests()
// Put your test cases in order here
Within the RunAllTests test method you should have something like:
 TestLoginAdmin
 TestCreate
 TestDelete
 TestCityDirectory(city1) – where city1 is a String from the dropdown selection
 TestCityDirectory(city2)
 TestCityDirectory(city3)
 TestCityDirectory(city4)
Task 3: Recording Your Code Running
Once you have all the methods working, you will record a video of the code running on your system, to prove you were able to get the system set up working.
On there is software called Panopto to be used for video recordings. You do not need to talk or have your web camera on. You just need to capture the recording on starting your test and the web browser running the automated test.
You will provide a link to your recording, either on Panopto or to an unlisted video on YouTube if you choose to record your video another way.
You will submit the following to the assignment folder on Canvas:
 A link to a video, showing the tests running on your system
o The video should be uploaded to Panopto or an unlisted video on YouTube
 The cs test file. You are not required to submit the entire C# solution.
 Unit test submitted as required, 100% code coverage (40%)
 TestCityDirectory has been created as a general purpose method (30%)
 Video to show Test Methods running on your home system (20%)
 Code is documented (XML comments) and follows guidelines given in Assignment #3 (10%)
Order Now

Calculate a fair price for your paper

Such a cheap price for your free time and healthy sleep

1650 words
Place an order within a couple of minutes.
Get guaranteed assistance and 100% confidentiality.
Total price: $78
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, how can I help?