uiautomator runs multiple tests on multiple devices? - ui-automation

My requirement is :
I Have a two methods and two mobiles... Q1::: i want to run first method in first mobile and second method in second mobile parllely. Q2::: two methods in two mobiles parllelly, Thanx in advance,please help me..
am running from "run.sh"
/home/rakesh/Android_sdk/android-sdk-linux/tools/android create uitest-project -n LaunchSettings -t 1 -p /home/rakesh/tests
export ANDROID_HOME='/home/rakesh/Android_sdk/android-sdk-linux'
ant build
adb push /home/rakesh/tests/bin/LaunchSettings.jar /data/local/tmp/
adb shell uiautomator runtest LaunchSettings.jar -c com.smartron.test.LaunchSettings

Check these following questions for clear picture about what can be done with UIautomator.
Automating call scenario with Uiautomator
How to run Uiautomator tests in to multiple devices?

Related

How can i run cypress cucumber test cases using tags in parallel

Can anyone help me on how to run cypress-tags run -e TAGS='#feature-tag' in parallel on gitlab pipeline.. I tried using
"e2e:test": "cypress-tags run -e -- TAGS='#feature-tag'",
"test:e2e": "run-p --race "e2e:test -- {#}" --"
but it didn't work although it is working when i use it with cypress run instead of cypress-tag run,
"e2e:test": "cypress run",
"test:e2e": "run-p --race "e2e:test -- {#}" --"
Here this work but i can not use tags with cypress run. It will be really grateful if you can help me with any solution.
It looks like there is no native support from cypress-cucumber-preprocesseor to achieve this. But there are other options in the market if you want to consider them. They are discussed in this issue.

Powershell or CMD - I want to run two commands at the same time without waiting for the first command to finish

I would like to run two commands (it doesn't matter if it's in powershell or cmd). The commands are as follows. I try to run both at the same time but because chromedriver needs to be running - it hangs forever and never reaches the second command.
chromedriver --port=4444
flutter drive --target=test_driver/app.dart --browser-name=chrome --release --no-headless
I am following the documentation here (towards the bottom of the page)
Flutter integration testing (but this isn't really that important for my question - just an FYI on what I was doing)
I keep googling for "how to run two commands" but the answers I usually get are to use "&" or "&&" but in my case this doesn't work as chromedriver will just stay open whilst it executes.
Thanks,
Michael Smith
In CMD you should try
start "" chromedriver --port=4444

Parallel execution of robot tests in Sauce Labs

I am using Eclipse+Maven based Robot Framework with Java implementation of SeleniumLibrary.
I could execute tests in sauce labs but it executes only on one VM. Has anyone achieved parallel execution of robot tests in Sauce Labs say in multiple VMs? Or can anyone guide to achieve this? Thanks in advance.
This is what I am using to run on multiple concurrent VM's on saucelabs. I have a 1-click batch file that uses start pybot to invoke parallel execution. Example:
ECHO starting parallel run on saucelabs.com
cd c:\base\dir\script
ECHO Win7/Chrome40:
start pybot -v REMOTE_URL:http://user:key#ondemand.saucelabs.com:80/wd/hub -T -d results/Win7Chrome40 -v DESIRED_CAPABILITIES:"name:Win7 + Chrome40, platform:Windows 7, browserName:chrome, version:40" tests/test.robot
ECHO Win8/IE11
start pybot -v REMOTE_URL:http://user:key#ondemand.saucelabs.com:80/wd/hub -T -d results/Win8IE11 -v DESIRED_CAPABILITIES:"name:Win8 + IE11, platform:Windows 8.1, browserName:internet explorer, version:11" tests/test.robot
-T tells pybot to not overwrite result logs but create a timestamped log for each run
-d specifies where the results will go
Works like a charm!
A parallel executor for Robot Framework tests. With Pabot you can split one execution into multiple and save test execution time.
https://github.com/mkorpela/pabot

How to capture iPhone app debug logs

I was researching libimobiledevice to basically capture the specific iPhone app logs. I have tried with the idevicesyslog command, but it gives me all the system logs along with my app.
I tried with idevicesyslog -d | grep com.example.Example but does not give me the info I am looking for.
I am interested in the debug logs of my app.
I know there is a way to capture it from the organizer in Xcode but I don't want to do it that way. I am planning to do it programmatically and then integrate with Appium automation script.
I was able to achieve this with idevicesyslog -d | grep '"https://ac.XYZ.COM" >& t' write to the file "t" and then clear the file and move on to the next step.
This I was able to achieve but the only issue I am facing here is that I need to update the command, like it wont write to log on real time basis when I am interacting with the device. If someone can suggest a way where it log to the file in a real time that would be great.
You can use -m option from idevicesyslog, this option is for "only print messages that contain STRING"
Example:
idevicesyslog -m "Vantage"
Hope this method is work for you :)

On a jailbroken iPhone, how can I run commands as root?

I want to login as a root using system call in Xcode. I try this code without success:
System("su");
System("alpine");
or
System("su root");
System("alpine");
or
System("su root alpine");
When I google it I came to know that this is done using NSTask or NSPipe.
Can anybody tell me how it possible to run multiple system commands using NSTask and NSPipe?
Please give me some hints about this or another method to do this. I am using this application on jailbroken iPhone.
Some more details are here.
If you want to launch something as root you may use sudo.
Example of it's usage in one line with the password:
echo <password> | sudo -S <command>