COMSATS UNIVERSITY, ISLAMABAD
Department of Computer Science
Assignment - 3, Fall 2024
[CLO4]: Apply DevOps pipeline automation techniques for code deployment
Course: CSC483 – Topics in Computer Science II (DevOps) Class: BCS-VII
Submission Deadline: December 27, 2024 Total Marks: 10
Part-I: [CLO4] Writing automated test cases using Selenium [5]
Selenium is an open-source project providing a range of tools and libraries aimed at supporting browser
automation. There are lots of use cases that Selenium offers ranging from automated web scraping to
automated web testing. In this part of the assignment, you are required to use Selenium to write at least 10
automated test cases to test your web application. Since building a web application is out of the scope of this
course, so it can be any simple web application with the only requirement being that it uses some Database
Server for storing application’s data. To write your test cases, you are free to use any programming language
that supports Selenium’s integration. Though Selenium supports several browsers, you are required to write
test cases for Chrome browser. Since we are going to integrate those test cases in Jenkins pipeline, running
on AWS EC2, you must use headless Chrome in your test cases.
Part-II: [CLO4] Creation of an automation pipeline with test stage [5]
Jenkins is an open-source automation server which helps automate the parts of software development related
to building, testing, and deploying, thus facilitating continuous integration and continuous delivery (CI/CD). In
this part, you are going to use Jenkins, running over AWS EC2 instance, to automate the test phase of the
software development. You are required to put the code for automated test cases in a GitHub repository.
Afterwards, you are required to write a Jenkin pipeline script using Git, Pipeline, and DockerPipeline plugins
that will fetch code from GitHub and test your web application in a containerized environment using Docker.
You can use the docker image at https://hub.docker.com/r/markhobson/maven-chrome/, if you intend to use
Java for writing test cases, or create a similar docker image by writing a dockerfile.
Upon completion of this assignment, you will be able to:
▪ Write automated test cases using Selenium
▪ Create an automation pipeline in Jenkins for test phase
▪ Configure and apply Jenkins pipeline for running automated test cases in a containerized way
What to submit
It’s an individual assignment and you need to submit a well formatted report describing your application,
documenting all the micro steps, along with the screenshots, you are to follow for both the parts. Furthermore,
for Part-I, you need to provide the url of the GitHub repository containing your test code. For Part-II, you need
to provide the dockerfile, if created, and the Jenkin pipeline script.