What to Include in Containers for iOS App Testing

Products included in typical iOS App Testing Container

Container technology has been enabling companies to pack various software components into a single physical package that can be used for various purposes. In mobile app testing, containers are extremely useful and can easily enable clean, secure and scalable test automation with the right set of tools, programming languages, frameworks and literally any software components that test scripts, automation components or application need for a test execution.

Last week we discussed about the benefits of containers for mobile app testing. In this blog we’ll take a look at quite typical ingredients for iOS containers and how to use those for iOS test automation.

Software is eating the world.” by Marc Andreessen was a famous quote about the state of the software world expanding over everything. Containers have been in essential role in this and containers have got extremely popular for variety of different use cases.

In a nutshell, containers can enable its users to create clean, portable, and consistent environment for mobile app development, testing and deployment. We’ve also found it the winning concept here at Bitbar to ramp up clean, reusable and distributable environment for iOS test automation.

Containers for iOS App Testing

One of the greatest thing with containers for app testing is the architecture and its nature how quickly it can be ramped up and used for specific use cases. Containers provide a standardized way to divide apps, tools and other stuff into distributable containers. Breaking software components up this way offers the ability to place them on different physical and virtual components/machines, using in the cloud or with on-premise solution. The flexibility provides advantages around components and provides the ability to quickly and easily make consistent packages.

As discussed, containers can incorporate a lot of different things that work as utilities and software components to aid testing and test automation effort for your mobile apps. So what goes into containers and how does the typical container image look like with different components? Here is our example:

Example of Software Components in Container

The Core Tools include all the basic development tools and in case of iOS it can be anything from Xcode to Fuse, Fastlane and others. And naturally all components and tools can be placed in containers with multiple versions. When a specific tool version is used, this can be configured in containers as well. Applications build for efficient mobile test automation must include properly built .IPA file and test package.

Programming language support provided with containers is also easy. Just include the installation package as part of the container and script will take care of getting it ready for test scripts, apps and others. In case of iOS Objective-C, Swift and some others provide a great foundation for tests.

With Apple products, iTunes or connector for it can be incorporated in container as well.

Other dependencies and middleware pieces can help making test automation straightforward, easy and effortless. In this category, some utilities for internet usage, downloading or uploading other components, as well as making certain functional testing capabilities possible, can be included in the container.

One of the greatest thing with containers for iOS app testing is that those can be included with variety of different test automation framework versions. For example with Appium, we may have several relevant versions for app testing. This may include versions that work with older versions of Xcode as well as with the latest version. Keeping container up to date with the state of the art iOS app testing components is actually trivial task.

For example, container for iOS app testing and test automation could look something like this:

SW included in typical container for iOS App Testing

How to Run Containers Efficiently with Mix of Tools and SW

This is always relevant question when customizing app testing environment and adding/removing tools or software components from it. But because of clean separation of container components and other software, tests executed inside the container enable users to customize the environment any way they like during the test session. Also, launch of test automation scripts is easy with container scripts or even from command line.

This is done by using the run.sh script that is used to launch the the container session. Any shell command or tool that is installed on the container can be called from run.sh script. For instance you can build anything with Maven:

mvn clean test –DexecutionType=serverside

or simply, install new additional libraries or tools with Brew, using the following command:

brew install python

To operate efficiently with containers, run.sh script must be configured and basically that is the force to drive execution of the test environment, tools and components. Here is an example of run.sh script:

	if [ "$(uname)" == "Darwin" ]; then
	elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
		echo "Unknown OS system, exiting..."
		exit 1

	echo "Extracting tests.zip..."
	unzip tests.zip
	if [ "$(uname)" == "Darwin" ]; then
	   	echo "Running iOS Tests..."
		mvn clean test -Dtest=IosAppiumExampleTest -DexecutionType=serverside
	elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
	    echo "Running Android Tests..."
		mvn clean test -Dtest=AndroidAppiumExampleTest -DexecutionType=serverside
	echo "Finished Running Tests!"
	cp target/surefire-reports/junitreports/TEST-*.xml TEST-all.xml



Containers provide an excellent way to build clean and consistent testing environment for your iOS apps. This blog dealt with few examples of what can be included in those containers that are eventually executable in local environment or cloud. If you look for more information about containers or how to run those in our cloud environment do get in touch.

Happy iOS Container Building, folks!

Buyer’s Guide – The Right Mobile Development Environment for a Higher ROI

Get to know the essential aspects in terms of choosing cloud-based or in-house testing solution for your needs.


  • This post is a good read regarding the usefulness of container technology in taking care of mobile app testing.The several software packages integrated into a single superstructure will definitely find its use and application in many services.

  • The support of programming languages,
    coding and other core development test tools integrated with various framework
    makes the container testing an efficient one.

  • Nice article. Every app development company should consider what type of testing solution fits their needs.