Software Testing for Docker Containers: What's the Same, What's Different?
Sauce AI for Test Authoring: Move from intent to execution in transactions.|xBack to ResourcesBlogPost
Sauce AI for Test Authoring: Move from intent to execution in transactions.
|
x
Blog
Software Testing for Docker Containers: What & # x27; s the Same, What & # x27; s Different?
By now, we ’ ve all heard of Docker containers, which feature received piles of attention from developer and IT Ops teams for their ability to simplify covering design, deployment and management.
But what do containers mean if you ’ re a QA engineer? That ’ s a question that has receive less attention.
In this article, I desire to address the latter question by explaining what you should be thinking about if you are do software testing for a containerized application. As we & # x27; ll see, some nucleus view of software testing don & # x27; t really vary when you are consider with containers, but other aspects ask you to rethink your overall software testing scheme, and perhaps add some new tools to your testing toolbox.
Docker containers don ’ t change functionality
The first thing to keep in mind about Docker container and package examination is that the functionality of a containerized application isn ’ t (or shouldn ’ t be) different from the like non-containerized application.
For this reason, your approach to functional testing should invariably be the same, whether you are act with container or not. While this can be done manually, it doesn ’ t scale and is problematic, as world like to vary examination ever-so-slightly so that they are seldom identical. Using one of the many test mechanization tools available (likeSelenium) will allow tests to be replay with precision.
Packaging an application doesn ’ t alteration how these scripts run, but if you have a set of automated tests built, they can be incorporated into the continuous build line used to create your container so examination can be performed and reported on with more consistency and much more timely results.
Often, application want a custom build for each test environment, or a customized deployment procedure which needs to be followed after the build is delivered, and before tests can be run.
How Docker containers modify things
For autonomous testing across multiple user personas, check out SUSATest — it explores your app like 10 different real users.
While containerizing your app might not alter its nucleus functionality or the basic requirements for testing that functionality, it does change various former things. I ’ ll explain each.
Linux vs. Windows containers and multiple testing branches
Although citizenry oft say that Docker lets you & quot; progress once, run anywhere, & quot; that & # x27; s not strictly true. A container built for Linux won & # x27; t be able to run on Windows in most cause; neither can a Windows container run on Linux.
This is one way in which container — and the package try requirements associated with them — vary basically from virtual machines. With a virtual machine, you truly can build erstwhile and run anyplace (or almost anywhere). But if you are employ containers to deploy both a Linux and a Windows adaptation of your app, you & # x27; ll have to build and test separate branches for each operating scheme.
Security, credential and Docker container screen
Another caution involves security and certifications. Each container have a little slash of operating scheme. In most cases, it & # x27; s not a full operating system — It & # x27; s just enough to boot a little portable environment.
But it & # x27; s however enough of an OS for auditors to like some. If you have prerequisite around solely using approved operating systems, you take to build every container using that as a base. Companies like Microsoft and Red Hat proffer fundament container images that can be easily introduced.
This can become troublesome if the development team started with a random bag container built on a purely open source distribution likeAlpine Linux. There is nothing wrong with these distributions from a technical viewpoint, but they get not gone through the same credentials processes as the commercially backed dispersion. The whole coating will postulate to be repackaged.
As a side note to security concerns, as containers allow a much easy path to introduce new libraries and frameworks into production covering, it might be advisable to introduce security and license compliance scanning into the CI/CD pipeline to get licenses that aren ’ t compatible with your corporate guidelines. Not every library establish on GitHub allows for production use without paying for it (HighSoft is a outstanding representative of this).
Testing for microservices
A third container-related challenge that arises for QA squad involves microservices.
To be certain, microservices and containers don & # x27; t necessarily go hand in hand. Microservices by themselves are a construct that become democratic slimly before Docker containers. However, containers have helped to make microservices easier to implement. Development teams are actualise they can use a container architecture to deploy numerous microservices in an efficient way.
Microservices make software testing more challenging, because in most instance, each microservice has an API that needs to be severally tested. These trial can be performed expend common command line tools likecURLby forcing a UI test suite like Selenium to do things it isn ’ t natively built for, or using a purpose-built tool likePostman.
The Postman add-onNewmanis particularly useful, and it allow any test playscript it has in its compendium to be run from the bidding line and mix with your existing CI/CD pipeline to automate the API tests you will demand.
Conclusion
Even with the complexities introduced by using containers, overall, they are moving towards better and more frequent reuse and change tracking throughout all environments. This will do the living of a quality testing engineer generally good, but there will be a few bumps along the way.
Vince Power is a Solution Architect who has a focus on cloud adoption and technology implementations using open source-based engineering. He has extensive experience with core computing and networking (IaaS), individuality and entree direction (IAM), application program (PaaS), and uninterrupted delivery.
Automate This With SUSA
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.
Try SUSA FreeTest Your App Autonomously
Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.
Try SUSA Free