Overview
Travis CI is a cloud-based service that offers continuous integration to test and build software projects, which can be hosted on various platforms such as GitHub, Bitbucket, GitLab, Perforce, Apache Subversion, and Assembla. The service offers a free trial plan that includes 10,000 build credits, allowing users to test it on public and private repositories without any charge. Additionally, there are no restrictions on the number of users that can utilize this plan.
pCloudy has been integrated with Travis CI so that every commit is automatically passed through the automated pipeline before it is pushed to the relevant feature branch. With pCloudy, you can carry out automated testing of your Native and Web applications, ensuring that your development code functions seamlessly across a comprehensive online Appium grid comprising over 5000 device-browser combinations that operate on the cloud.
Prerequisites
In order to conduct Mocha tests using pCloudy, you must have the following prerequisites in place:
Global Dependencies
- A Git or GitHub repository
You must first download and install node.js and node package manager or npm. For installation of node.js using homebrew, execute the given command in your terminal:
In case you already have npm installed, it is advisable to update it to the most recent version. You can do this by running the following command in your terminal:
Integrating pCloudy With Travis CI
To incorporate pCloudy with Travis CI, you must include the configuration file .travisci.yml in your root directory of your feature branch on GitHub, and specify all the required configurations to conduct the tests. With every commit, Travis CI will execute the build (#.travisci.yml), while simultaneously running the test on pCloudy My Active Sessions.
It is essential to set up your repository with Travis CI to enable the running of build steps.
Below is the sample config file for Integration with Mocha :
.travisci.yml this directory should be added in the root directory of of the branch
And below is the content for .travisci.yml
The given code shows the desired capabilities needed to execute the Sample-test.
The "pCloudy_Username" and "pCloudy_ApiKey" fields can be customized as per the user's credentials.
Parallel Test
Use the parallel-Test-code to run the parallel test build . Once you have done this, you will need to specify the desired capabilities required to execute the Sample-test.
The commonCapabilities field contains properties such as browserName, pCloudy_Username, and pCloudy_ApiKey, which need to be customized as per your credentials. In the multiCapabilities field, you can add as many devices as you require by specifying the pCloudy_DeviceFullName property for each device. This will enable you to execute the Sample-test on multiple device-browser combinations in parallel, leveraging the benefits of pCloudy's cloud-based testing infrastructure.