Strategy for Appium in C# - 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.

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.

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

Related

Raspberry Pi CPU Temp

I have a Raspberry Pi 3 running Windows 10 IoT Core. My question is; would it be possible, or is there a way to monitor the CPU temperature of the device either via a remote PowerShell connection, locally on the device in the command line console or if all else fails using a C# deployed app on the device?
I confess to being a C# noob, hence it being my third option.
Why?... I'm planning on building a custom case out of Lego for a stack of several devices and want to assess whether I need to purchase a bunch of heat sinks and cooling fans etc.
Many thanks for your time and assistance.
I hope this can guide you to the right track.
In order to access to low-level BCM2836 peripherals that the IoT SDK or PowerShell client does not provide, you'll need to write your own drivers.
You can follow the code samples from https://github.com/ms-iot/bsp/tree/master/drivers, it's written under WDK framework so you'll need to get yourself familiar with that in order to get started.
I guess eventually you'll end up with something like one of those samples under the drivers sample.
When you're done, deploy your driver follow this tutorial https://developer.microsoft.com/en-us/windows/iot/win10/samples/driverlab3
I'm not 100 percent sure this is the right way to go, but if someone could correct me or point out a better solution, I would be more than happy to learn from it.

Send data from UWP app to Unity3D on the same machine

I have a universal apps getting data from Microsoft's Band 2 (accelerometer) and want to export the processed data in the app to the unity project to be used as input control. The data will be frequent, so real-time response is preferred.
What should I learn or use to achieve this?
I'm pretty sure it would be easier to write a plugin for Unity to connect to Band directly rather than to connect to an app that connects to Band (actually I have no clue how to do that).
Having that in mind, you probably should:
download the appropriate Band SDK from the official website
Read about writing plugins for Unity for the platform you need (Desktop/WP, Android, iOS)
Draw a pentagram and hope for the best

Selenium Frameworks and Remote Testing, recommended framework?

I installed and played around with Selenium WebDriver on Visual Studio 2012 (C#) last week and was very impressed by how easy it was to automate browser testing. I now want to find out if I can expand the functionality. I'm hoping someone can point me in the right direction. Here's what I'd like to achieve:
Run Selenium WebDriver tests on remote machines, ideally managed by a central control machine.
Integrate test results with Quality Center or Test Manager
How to automate tasks such as application installer? I realise Selenium can't do this.
Utilize an existing framework that already has functions for common tasks such as batch testing, logging, copying files, etc.
I apologize if my questions are a bit broad but I'm certain others have tried to achieve this with Selenium before.
Your help is very appreciated,
John

Ideas for a C# UI framework

I need to develop a C# touch-screen desktop application with a "modern good-looking" UI.
How would you approach it? I´ve got in mind using Flash (just for the UI) or WPF... but i´m open to any idea or any third-party C# UI you´d know.
Is Flash easy to integrate with C#?
Thanks for your knowledge!
You should look for a AMF remoting library in C#.
Remoting is when you call a function on your server from flash.
AMF (version 0 or 3) is a binary format used to encode object transfered
between client and server
Weborb and fluorine are solutions for this.
see : .NET and AMF
You will probably be doing well with a third party framework to avoid the overhead of writing user interactions, controls, etc.
A couple of options are
http://xamarin.com/
http://www.resco.net/developer/mobileformstoolkit/
A review of these options is provided here.
I recall combining a flash interface with a C# back-end back in university. There's a method called fscommand() that will take a couple of string parameters (I may be mistaken, read up on it) to pass to and from the interface and the C# "code-behind".Flash is an ok option, but if I were you I'd opt for a WPF interface. I'm a huge fan of the telerik libraries, their WPF one allows you to create the most modern-looking interfaces and dashboards. Not to mention that the skills you will acquire while learning enough about wpf will be hugely beneficial in your career as a developer the way things are going (depending, obviously, on what direction you're heading).
FlashBuilder 4.6 has some nice functionality for quickly building a UI that work on a desktop or mobile device. You could use FluorineFX (free) or webOrb on a webserver to send data back and forth to a database server if that were needed. If you build it with the Flashbuilder 4.6 mobile project template, it would work on a iPad, mac, windows pc, or android device as well. Since a pc touchscreen should use the same type of finger gestures as a mobile app, this might be a nice way to go. (I don't actually have a touchscreen on my pc, but it runs well with a mouse, so I'd assume it worked with gestures too).
Adobe.tv has lots of examples of building a mobile app project (Which also runs on a PC) and there is a Flashbuilder 4.6 free trial.
http://flex.org/

How to write applications for different platforms? Linux, Mac, Windows and Mobile Platforms

We want to write a client for an online service which should be available on as many platforms as possible. This question is about what programming language and framework we should use to create this client.
These platforms are required: Linux, Mac, Windows, iOS (iPhone, iPod, iPad) and Android. The more the better.
For the mobile platforms there is Titanium Mobile. I haven't tried this thing yet, the website says you can develop for both iOS and Android using web skills such as Javascript. I don't know yet if you can deploy for both platforms using the SAME code. It would be great!
There is also Titanium Desktop but I don't like the idea that the complete source code is shared with the final application. Titanium does this for Mobile too but it isn't that easy to modify an app loaded via App Store.
So, what other way is there to create an application which runs on at least the three major desktop platforms? I thought c# with mono would be the way to go but I just realized that you need to use mono with MonoMac in order to publish it on the Mac App Store and use things like Growl. And since MonoMac is naturally only available for Macs, it's again not possible to deploy the mono app on all platforms without rewriting it for at least the Mac. And it would be nice if the app looks "native" on all platforms. Gtk# just does not look good on a Mac. It's "okay" on Windows and great on Linux.
I know we could use Objective-C for iOS and Mac, Java for Android, C#.net for Windows and C#.mono for Linux but the main point is that we don't want to write the same app in a lot of different languages. That would make development and maintenance really hard.
And we prefer languages with C-style syntax which are much easier to learn for us PHP web developers. Btw: We dislike Air and I'm not sure about Java since I never used it but it also does not look "native" and it feels kinda slow.
Edit:
Just a note: It wouldn't be a problem to create an own form for each platform if at least the remaining code is the same. Is it possible to use MonoMac, Gtk# and Win Forums in the same C# application? And I'd prefer C# over C++ as I have no skills in C++, so I first need to check how hard it is to write with Qt.
Another note: We don't plan to spend much money and because we need to pay Apples Developer Programs we want to use free or cheap technology. Preferable Open Source.
Just use C# for all of the above.
The mono project will cover Mac and Linux, with monodroid your android requirements are covered and monotouch will take care of iPod/iPad/iPhone.
In regards to UI - mono has full support for the System.Windows.Forms namespace, so you don't have to use GTK# if you don't want to.
I don't think I need to mention windows support ;)
If you really want to support all those platforms from a single application, your best bet will be to create a web application. With HTML5, such an application can even be cached on the device and used when no connection is available. Also, that strategy would make it feasible to customize the UI based on the device running the app.
You will not have good luck if you set out to build a single native app that runs on Android and iOS, let alone all the other platforms you mentioned. The reason that they're different platforms rather than the same is that they're, well, different. They have different capabilities, run on different hardware, are built with different languages, employ different application models with different user interfaces, and have audiences with different expectations.
The best solution I've come across over the years is Qt SDK.
Great support for all major platforms, Symbian, OS X, Linux flavors, Windows, Windows CE (mobile), Android and iOS partial support and etc.
Its base is C++ but bindings for almost every language (like C#) is available. Lots of help and support is also covered.
The core Qt libs are very fast and extensive, And the whole KDE desktop (of Linux) is done with it. Famous software like VLC and VirtualBox are done in Qt.
Another relatively new way of doing cross-platform development is to use the open source Eto.Forms, which allows you to have one UI codebase target each platform's native toolkit. It is a UI abstraction layer that can target GTK#, MonoMac/OSX, WinForms, and WPF.
There is also an iOS port in the works.
Java sounds like the best fit. It is cross-platform, easy to understand, has a huge userbase and android is based on it.
Depending if you need an offline interaction mode, it sounds like you should develop a web application. You can develop a mobile version and a desktop version and thus support all the of the above platforms. Look at youtube's application for Iphone, it retains the same functionality as the the iphone app but is purely html. Furthermore, html5 capable browsers could also have the ability to run offline.
Crazy as it sounds, check out Flash/Flex - it is cross platform, code once, run everywhere ,now compiles down to native code on e.g. Android and iOS and the 10.1 player is shipping all over. I had to solve exactly this problem and when Flash Builder Burrito catered for mobile after working with it for a while I have switching from C#/Flash hybrid to Flash only for clients. (Our backend is C#/Node/C++, etc).
Depending on your timelines and needs it is something look into.
Some random links to peruse:
Blog post about performance and video to single app multi device
Developing flash and flex applications

Categories

Resources