https://github.com/SeleniumHQ/docker-selenium/blob/trunk/k8s-deployment-full-grid.yaml where I used minikube in local mac machine and executed parallel tests.
But am not able to understand how to create jenkins file for this using multiple services mentioned in yaml file and a maven container.
3. I also tried but then here firstly am not sure how to get the
http://localhost:4444/wd/hub and also I feel it wont scale in case I have multiple feature files
podTemplate(yaml: """
apiVersion: v1
kind: Pod
spec:
containers:
- name: maven
image: maven:3-openjdk-11
command: ['cat']
tty: true
services:
hub:
image: selenium/hub:3.14
ports:
- "4444:4444"
chrome:
image: selenium/node-chrome:3.14
depends_on:
- hub
environment:
- HUB_HOST=hub
chrome1:
image: selenium/node-chrome:3.14
depends_on:
- hub
environment:
- HUB_HOST=hub
"""
) { node(POD_LABEL) {
try {
stage('Checkout') {
git branch: "${GIT_BRANCH}", url: "${GITREPO}", credentialsId: "${pullCredNameGitHub}"container('maven') {
stage('Build and run test') {
sh """
mvn -Dwebdriver.remote.url ='
http://localhost:4444/wd/hub' verify -Pgui-sg
"""
}