TestProject Tutorial 17 | How to run TestProject tests from Docker - Part 1

preview_player
Показать описание
Notes:
Prerequisite - What is Docker
Introduction - Why do we need TestProject Agent on Docker
Docker Setup - Download and Install
How to start TestProject agent on Docker
How to run tests on Docker agent

References & Links:

Docker is a platform that enables to build, share and run application or services in isolated containers

In order to run test you need an agent
Agent is a powerful wrapper for Selenium and Appium
Once you install and start agent, can run tests on all browsers and devices connected on that system
Agent contains all drivers and configurations setup for selenium and appium

*Why do we need TestProject Agent on Docker*
Flexible - Can setup and run agent anytime - quickly and easily
Can use a single command to setup a Docker container with required browsers and TestProject agent
Can create a container when required and remove after execution
Can use permanent or temporary (ephemeral) docker containers
No need of physical machines with separate OS, browsers etc
Saves resource, time & cost
Integrates well with CI/CD workflow

How to download and install
Docker

How to start TestProject agent on Docker
Step 1 - Install Docker
Step 2 - Setup TestProject Agent in Docker
Permanent
1 - Create and Copy API Key from your TestProject Account
Integration - API - Create API
2 - Open Terminal and run the command

docker run --name testproject-agent -e TP_API_KEY="Your API Key" -e TP_AGENT_ALIAS="My First Agent" -v “location of local host folder”:/var/testproject/agent testproject/agent:latest

Ephemeral
1 - Create and Copy API Key from your TestProject Account
2 - Copy the JOB ID
3 - Run the command

docker run --rm -e TP_API_KEY="REPLACE_WITH_YOUR_KEY" -e TP_JOB_ID="REPLACE_WITH_YOUR_JOB_ID" testproject/agent:latest

Using Docker Compose to create multi-container service for Test Execution
Step 1 - Install Docker
Step 2 - Create a YAML file as shown
Step 3 - Update the API Key, Job ID and local volume path
Step 4 - Run the command

docker compose -f “filename” up -d

DOCKER COMMANDS
docker -v
docker --version
docker version
docker info
docker ps -a -q -- list all container id
docker stop $(docker ps -a -q)
docker system prune

Every LIKE & SUBSCRIPTION gives me great motivation to keep working for you

You can support my mission for education by sharing this knowledge and helping as many people as you can

If my work has helped you, consider helping any animal near you, in any way you can.

________ ONLINE COURSES TO LEARN ________

Never Stop Learning
Raghav
Рекомендации по теме
Комментарии
Автор

Hi sir
Good evening
Could you please do some tutorials on SUITEST Automation tool which is used for automating OTT based applications

dandualekya
Автор

Hey !!
After starting an ephemeral instance .. I am getting below output.
Agent is registered, |
Authenticating with TestProject..
Requesting authenticating token... Authenticated successfully Updated state to: Stopped Stopping... Stopping Identity Server client... Stopping internal web server... Stopping other servers (Selenium & Appium)... Stopping ADB... ADB Stopped. Unregistering Agent... Deleting agent identity file: id.dat
All modules stopped. Agent state machine stopped. Agent will exit with code: 5 *** AGENT - STOP *** testproject-agent exited with code 5

Test project Agent status shows disconnected. No jobs gets executed. All requirements like Api keys n job ID are mentioned. Could you please tell me what's wrong. ??!!!

sakshigupta
Автор

Hey Raghav, is it possible to do this with apps using the docker agent?

minhtruong
Автор

Hi Raghav,

Can i run mobile testcases iOS and Android using docker agent on testproject.io tool?

nikitagawande
Автор

Hello is this open source, can someone fork it?

chiragforu
Автор

Sir, I am getting error:-

docker: invalid reference format.
See 'docker run --help'.

akashtawade
Автор

Hello Sir, very good video! Could you please make a video to execute Python Selenium Scripts on Docker ? I am using Chromedriver with local path in my python script and running into errors. Thank you so much!

deepagaonkar
Автор

Raghav
Do you provide classes online?? If yes please i am interested..

vimlabisht
Автор

Please can u help me with a doubt

Do we need docker volume for the applications if we Deploy it with kubernetes.
If we use which volume should we use docker volume or kubernetes volume
Please help me with this

dhanushkumar
Автор

How to run junits of springboot app in docker

satyadurgadeviv