-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* first commit by codeSolicitor * environment variable fix * fixing environment variable * adding fixes
- Loading branch information
1 parent
d9e00d0
commit f608a6a
Showing
17 changed files
with
162 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
run_all_in_parallel: | ||
make -j test_Android1 test_Android2 test_iOS1 test_iOS2 | ||
make -j test_GalaxyS20Plus #test_GalaxyS10 | ||
|
||
test_Android1: | ||
robot --variable version:10 --variable platform:Android --variable deviceName:"Galaxy S20" --variable isRealMobile:true --variable visual:true --variable network:false --variable console:false --variable app:"lt://" Tests/Android.robot | ||
test_GalaxyS20Plus: | ||
robot --variable version:10 --variable platformName:Android --variable deviceName:"Galaxy S20" --variable isRealMobile:true --variable visual:false --variable network:false --variable console:false Tests/Android.robot | ||
|
||
test_Android2: | ||
robot --variable version:10 --variable platform:Android --variable deviceName:"Galaxy S10" --variable isRealMobile:true --variable visual:true --variable network:false --variable console:false --variable app:"lt://" Tests/Android.robot | ||
test_GalaxyS10: | ||
robot --variable version:10 --variable platformName:Android --variable deviceName:"Galaxy S10" --variable isRealMobile:true --variable visual:false --variable network:false --variable console:false Tests/Android.robot | ||
|
||
test_iOS1: | ||
robot --variable version:14 --variable platform:iOS --variable deviceName:"iPhone 11" --variable isRealMobile:true --variable visual:true --variable network:false --variable console:false --variable app:"lt://" Tests/IOS.robot | ||
test_Android1: | ||
robot --variable version:10 --variable platformName:android --variable deviceName:"Galaxy S20" --variable isRealMobile:true --variable visual:false --variable network:false --variable console:false Tests/Android.robot | ||
|
||
test_iOS2: | ||
robot --variable version:14 --variable platform:iOS --variable deviceName:"iPhone 12" --variable isRealMobile:true --variable visual:true --variable network:false --variable console:false --variable app:"lt://" Tests/IOS.robot | ||
test_ios1: | ||
robot --variable version:14 --variable platformName:ios --variable deviceName:"iPhone 12" --variable isRealMobile:true --variable visual:false --variable network:false --variable console:false Tests/IOS.robot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
*** Settings *** | ||
Library AppiumLibrary | ||
|
||
*** Variables *** | ||
|
||
@{_tmp} | ||
... platformName: ${platformName} | ||
... platformVersion: ${version} | ||
... deviceName: ${deviceName} | ||
... visual: ${visual} | ||
... network: ${network} | ||
... isRealMobile: ${isRealMobile} | ||
... name: 'RobotFramework Lambda Test' | ||
... app: 'lt://proverbial-android' | ||
|
||
#${BROWSER} ${ROBOT_BROWSER} | ||
${CAPABILITIES} ${EMPTY.join(${_tmp})} | ||
${REMOTE_URL} https://%{LT_USERNAME}:%{LT_ACCESS_KEY}@mobile-hub.lambdatest.com/wd/hub | ||
#${app} lt://APP100201841649255527998398 | ||
${app} lt://proverbial-android | ||
${TIMEOUT} 3000 | ||
|
||
*** Keywords *** | ||
|
||
Open test app | ||
[Timeout] ${TIMEOUT} | ||
#Open Application ${REMOTE_URL} platformName=${platformName} platformVersion=${version} deviceName=${deviceName} visual=${visual} network=${network} isRealMobile=${isRealMobile} name="RobotFramework Lambda Test" | ||
Open Application ${REMOTE_URL} platformName=${platformName} platformVersion=${version} deviceName=${deviceName} visual=${visual} network=${network} isRealMobile=${isRealMobile} app=${app} name="RobotFramework Lambda Test" | ||
|
||
Close test app | ||
Close All Applications |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import os | ||
from robot.libraries.BuiltIn import BuiltIn | ||
|
||
def report_lambdatest_status(name, status): | ||
selenium = BuiltIn().get_library_instance('Selenium2Library') | ||
|
||
# Mark test status pass/failed | ||
lambda_status = "passed" if status=="PASS" else "failed" | ||
lambda_status_script = 'lambda-status={}'.format(lambda_status) | ||
selenium.execute_javascript(lambda_status_script) | ||
# Update test name | ||
lambda_status_script = 'lambda-name={}'.format(name) | ||
selenium.execute_javascript(lambda_status_script) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<robot generator="Robot 6.0.1 (Python 3.10.8 on darwin)" generated="20230105 16:02:28.538" rpa="false" schemaversion="3"> | ||
<suite id="s1" name="IOS" source="/Users/ankitagarwal/Documents/Code-Snippet/LT-appium-python-robot/Tests/IOS.robot"> | ||
<test id="s1-t1" name="Example of connecting to Lambdatest via Robot Framework" line="13"> | ||
<kw name="Open test app" library="Common" type="SETUP"> | ||
<kw name="Open Application" library="AppiumLibrary"> | ||
<arg>${REMOTE_URL}</arg> | ||
<arg>platformName=${platformName}</arg> | ||
<arg>platformVersion=${version}</arg> | ||
<arg>deviceName=${deviceName}</arg> | ||
<arg>visual=${visual}</arg> | ||
<arg>network=${network}</arg> | ||
<arg>isRealMobile=${isRealMobile}</arg> | ||
<arg>app=${app}</arg> | ||
<arg>name="RobotFramework Lambda Test"</arg> | ||
<doc>Opens a new application to given Appium server. | ||
Capabilities of appium server, Android and iOS, | ||
Please check https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/server-args.md | ||
| *Option* | *Man.* | *Description* | | ||
| remote_url | Yes | Appium server url | | ||
| alias | no | alias |</doc> | ||
<kw name="Capture Page Screenshot" library="AppiumLibrary"> | ||
<doc>Takes a screenshot of the current page and embeds it into the log.</doc> | ||
<status status="FAIL" starttime="20230105 16:02:43.680" endtime="20230105 16:02:43.681"/> | ||
</kw> | ||
<msg timestamp="20230105 16:02:43.682" level="WARN">Keyword 'Capture Page Screenshot' could not be run on failure: Execution terminated by signal</msg> | ||
<status status="FAIL" starttime="20230105 16:02:28.623" endtime="20230105 16:02:43.682"/> | ||
</kw> | ||
<timeout value="50 minutes"/> | ||
<status status="FAIL" starttime="20230105 16:02:28.623" endtime="20230105 16:02:43.682"/> | ||
</kw> | ||
<kw name="Close test app" library="Common" type="TEARDOWN"> | ||
<kw name="Close All Applications" library="AppiumLibrary"> | ||
<doc>Closes all open applications.</doc> | ||
<status status="PASS" starttime="20230105 16:02:43.683" endtime="20230105 16:02:43.683"/> | ||
</kw> | ||
<status status="PASS" starttime="20230105 16:02:43.682" endtime="20230105 16:02:43.683"/> | ||
</kw> | ||
<timeout value="50 minutes"/> | ||
<status status="FAIL" starttime="20230105 16:02:28.623" endtime="20230105 16:02:43.683">Setup failed: | ||
Execution terminated by signal</status> | ||
</test> | ||
<status status="FAIL" starttime="20230105 16:02:28.539" endtime="20230105 16:02:43.684"/> | ||
</suite> | ||
<statistics> | ||
<total> | ||
<stat pass="0" fail="1" skip="0">All Tests</stat> | ||
</total> | ||
<tag> | ||
</tag> | ||
<suite> | ||
<stat pass="0" fail="1" skip="0" id="s1" name="IOS">IOS</stat> | ||
</suite> | ||
</statistics> | ||
<errors> | ||
<msg timestamp="20230105 16:02:43.682" level="WARN">Keyword 'Capture Page Screenshot' could not be run on failure: Execution terminated by signal</msg> | ||
</errors> | ||
</robot> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
selenium | ||
selenium==3.141.0 | ||
robotframework | ||
robotframework-appiumlibrary | ||
robotframework-appiumlibrary |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.