'Strategy for Appium in C#
I’ve done some projects with Selenium in C#. But now we are looking what the best strategy is for mobile testning. Can you give me some advice? I’ve red some tutorials but I really don’t know where to start.
Install Appium server on Mac and point all iOS test to that server? How about the Android tests? Do they also point to the Appium server on Mac?
So you can hear, I need some advice or a really good tutorial in this matter.
Thanks in advance.
Solution 1:[1]
What you require is Selenium Grid: https://www.seleniumhq.org/docs/07_selenium_grid.jsp
Read up on this thoroughly, as I guarantee it is what you are looking for. I wrote an automation framework in the Unity game engine to load a game executable onto iOS devices and Android devices.
I physically connected the testable devices to the Macbook that was being used as a server, and Jenkins build agent.
You will want to download the Selenium Grid jar, which is a hub that proxies commands to multiple Appium processes all running on the same machine (each process communicating with a separate device). This server will help Appium to segregate functionality so that multiple Appium processes can run at once, and communicate over WiFi or physical cable connections with attached devices.
Once you are ready, I suggest reading my tutorial on setting up Jenkins with an Appium/Selenium Grid integrated solution. This tutorial is specific to setting up a framework I developed called Trilleon, within the Unity game engine, but the vast majority of this tutorial will not differ at all when you are setting up testing for a regular native application in Appium with Selenium Grid.
https://github.com/disruptorbeam/trilleon/wiki/Setup-Linux-Mac
https://github.com/disruptorbeam/trilleon/wiki/Jenkins-Setup
And here are various samples of bin/bash scripts that I developed (also for this framework, but much of it will match what you need).
https://github.com/disruptorbeam/trilleon/blob/master/server/sh/run-tests.sh
The following will create a node in Selenium Grid. Each instance that is running at a time will need to be registered in this way. Use this to determine how you can fill it out and provide the node json to your Selenium Grid
https://github.com/disruptorbeam/trilleon/blob/master/server/sh/CreateUniqueNodeJson.sh
Here are python scripts launched from Jenkins to run the appium. This will be run by several jobs all running in unison in their own workspace. https://github.com/disruptorbeam/trilleon/tree/master/server/py
The above python scripts will have a bunch of stuff that is completely irrelevant to you, but it will also have everything you need to launch appium on android or ios devices.
Solution 2:[2]
As for mobile testing, I suggest that you could take a free trial on WeTest. It support Appium?Espresso?XCTest and custom environment which could help you complete automation test on a wide range of devices. Visit https://www.wetest.net/products/automation/?utm_source=bn&utm_medium=AM-BN-2
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | hao Tian |
