DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Implementing CI/CD Pipelines With Jenkins and Docker
  • A Concise Guide to DevSecOps and Their Importance in CI/CD Pipeline
  • Zero to Hero on Kubernetes With Devtron
  • Testing Serverless Functions

Trending

  • Building a Rust Command Line Interface to Chat With Llama 3.2
  • Top 5 Books to Enhance Your Software Design Skills in 2025
  • I Built an Automatic Proposal Generation LLM and Open-Sourced It on GitHub
  • Top Mistakes Made by IT Architects
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. DevOps and CI/CD
  4. CI/CD Pipelines to Run Unit Testing in Docker [Video]

CI/CD Pipelines to Run Unit Testing in Docker [Video]

This video demonstrates how to run unit tests within a Docker container and explains some of the intricacies of a Dockerfile.

By 
Mohamed Radwan user avatar
Mohamed Radwan
·
Jul. 11, 19 · Presentation
Likes (4)
Comment
Save
Tweet
Share
10.4K Views

Join the DZone community and get the full member experience.

Join For Free


This video will focus on how to run unit testing inside a Docker container, and it will show how to run a unit test manually inside the container.

It takes a look at how to run unit tests as part of the CI/CD pipelines. It will explain in detail how Dockerfile builds Docker image to run unit tests and how to save test results as part of the Docker image and how to run a container from that image to see the test results.

Image title


For more information about how to work with Docker see Docker for beginners. It will explain the Dockerfile line by line, so you can understand and see exactly what the real operation is and what is happening by each line in the Dockerfile. This is a good opportunity to understand Dockerfile. It starts by copying the project from a local machine which includes the unit test to the remote host machine, running a container, and copying the project from the host machine to the running container then run unit tests and see the results.

After that, creating Dockerfile with all the instructions including pulling a Docker image from a public docker hub, copying the project to the container and running the unit test. The third and the last part is to use Azure Pipelines to do all the Dockerfile steps as part of Continuous Integration pipeline and see Azure Pipelines active log with the unit test execution and test results.

Continuous Integration/Deployment unit test Docker (software) Pipeline (software)

Published at DZone with permission of Mohamed Radwan, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Implementing CI/CD Pipelines With Jenkins and Docker
  • A Concise Guide to DevSecOps and Their Importance in CI/CD Pipeline
  • Zero to Hero on Kubernetes With Devtron
  • Testing Serverless Functions

Partner Resources


Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: