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
Newsletter
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

  • PWA on iOS, Part 1: PWAs on the iPhone Are Older Than They Look
  • AI-Era Cybersecurity, Part 1: Mapping Glasswing, Daybreak, Lightwell and the Tools Racing to Find and Fix Bugs
  • Save To Bookmarks/Favorites
  • DZone's Article Types

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  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
·
Jul. 11, 19 · Presentation
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
11.3K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in


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. 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

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

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 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook