Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
pipeline {
agent any
environment {
LT_USERNAME = "aayushis"
LT_ACCESS_KEY = "LT_YfpWipMk0LwK9H8x5WCLawCWCmtAehrXGrGZzFXZQFXkM2u"
PATH = "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:$PATH"
}
stages {
stage('Initialize') {
steps {
echo 'Starting Multi-Platform Test Suite...'
}
}
stage('Mobile Automation') {
parallel {
stage('Android Suite') {
steps {
dir('android-sample') {
sh 'npm install'
// Saari Android files ko ek ke baad ek chalayega
sh 'npx wdio android_ltOptions_w3c/android-app-single-ltOptions-w3c.conf.js || true'
sh 'npx wdio android-parallel.conf.js || true'
sh 'npx wdio android_ltOptions_w3c/android-web-single-ltOptions-w3c.conf.js || true'
}
}
}
stage('iOS Suite') {
steps {
dir('ios-sample') {
sh 'npm install'
// Saari iOS files ko ek ke baad ek chalayega
sh 'npx wdio ios_ltOptions_w3c/ios-app-single-ltOptions-w3c.conf.js || true'
sh 'npx wdio ios-parallel.conf.js || true'
}
}
}
}
}
}
post {
always {
echo 'Final: All test suites triggered. Check LambdaTest Dashboard for results.'
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@ exports.config = {
specs: ["./../specs/android-test.js"],
exclude: [],

commonCapabilities: {
build: "LT_Appium_NodeJS_WebDriverIO_ltoptions_w3_App_Automation",
devicelog: true,
visual: true,
},

capabilities: [
{
"platformName": "Android", // W3C standard ke liye platformName bahar hona chahiye
"lt:options": {
deviceName: ".*",
name: "android_ltOptions",
isRealMobile: true,
app: process.env.LT_APP_ID||"lt://proverbial-android",
app: process.env.LT_APP_ID || "lt://proverbial-android",
platformName: "Android",
enableCustomTranslation: true,
project: "LT_Appium_NodeJS",
build: "Jenkins_Build_Validation", // Saari cheezein LT:OPTIONS ke andar
devicelog: true,
visual: true,
w3c: true
}
},
],
Expand All @@ -33,18 +32,14 @@ exports.config = {
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
path: "/wd/hub",
hostname: process.env.LT_GRID_URL||"mobile-hub.lambdatest.com",
hostname: "mobile-hub.lambdatest.com",
port: 80,

framework: "mocha",
mochaOpts: {
ui: "bdd",
timeout: 20000,
},
};

exports.config.capabilities.forEach(function (caps) {
for (var i in exports.config.commonCapabilities)
caps[i] = caps[i] || exports.config.commonCapabilities[i];
});

};

// YAHAN SE WOH "forEach" WALA LOOP HATA DEIN (Delete the loop)
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ exports.config = {
specs: ["./../specs/android-web-test.js"],
exclude: [],

commonCapabilities: {
build: "LT_Appium_NodeJS_WebDriverIO_ltoptions_w3_Web_Automation",
visual: true,
},

capabilities: [
{
"platformName": "Android",
"lt:options": {
platformName: "Android",
deviceName: ".*",
name: "android_ltOptions_w3c",
platformVersion: "12", // Optional: version specify kar sakte ho
name: "android_web_ltOptions_w3c",
build: "LT_Appium_NodeJS_Web_Automation",
isRealMobile: true,
enableCustomTranslation: true,
w3c: true,
visual: true,
video: true,
enableCustomTranslation: true,
}
},
],
Expand All @@ -32,18 +31,12 @@ exports.config = {
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
path: "/wd/hub",
hostname: process.env.LT_GRID_URL||"mobile-hub.lambdatest.com",
hostname: "mobile-hub.lambdatest.com",
port: 80,

framework: "mocha",
mochaOpts: {
ui: "bdd",
timeout: 20000,
},
};

exports.config.capabilities.forEach(function (caps) {
for (var i in exports.config.commonCapabilities)
caps[i] = caps[i] || exports.config.commonCapabilities[i];
});

};
Loading