Should I use selenium, appium or selendroid? - android

Beginner programmer here- I want to convert a small program I made into an app- the original program uses selenium to load a website, ask for a username+ password, and auto logs you in and clicks a bunch of boxes and dropdowns, then exits.
I want to turn this all into an android app- I have a couple questions:
do I have to rewrite all my code in android studio
can I still use selenium or do I have to set up appium/ selendroid and if so, which one?
basically, the app should open up a UI screen, and ask for a username and password. From there it will open up a browser and click a bunch of stuff and that is it.
lots of love!

I am giving some important high level observations
App Type Cases
If your AUT is an android/ios native app then yes you have to use Appium or native frameworks like Espresso,XCUTest etc
2.If your AUT is a webapp with just a different user-agent like mobile,tablet etc then same tests can be used with little modification e.g.
2.1 You can use mobile emulation with Selenium - Chrome browser with mobile dimension
2.2 You can also use Appium with Emulator or real device - Chrome browser in Mobile device.
If your AUT is a hybrid app i.e. partly native and partly chrome session then
you have to use Appium
If Existing Tests Cases already present
If your browser application tests are already written in Selenium then you can use a tools which supports selenium methods like Appium for writing your android or ios app tests, this will help you in knowing scenarios to cover.
If your app is webapp then existing test cases will work with little modifications
If your app is hybrid then few existing cases will work which are under webview.
If Existing Tests Cases are not present
You are free to choose language of your choice as per knowledge and tool which best suites to your application.
Original Question - I want to turn this all into an android app- I have a couple questions:
do I have to rewrite all my code in android studio
Yes if native app, Partially yes if hybrid and No if webapp
can I still use selenium or do I have to set up appium/ selendroid and if so, which one?
for webapp you can use selenium but for hybrid or native app Appium is must. Read documentation and see which is easy for you to pick up.
Note - Selendroid is deprecated because it was used with very old Android version device e.g. Android IceCream 4.2 or below version or API level < 17

Related

Automate some actions in a browser (via Selenium?)

I need to automate some actions (testing ajax login on demand) in a browser.
I manage to obtain the desired behavior using selenium and chromedriver on my pc, but I need to make it work either in a UWP app or in an Android app (*and must run without a pc once deployed)...
Notes:
UWP App
It's a web service that runs on Windows 10 IOT Core on a Raspberry 3b+ (ARM7)
Selenium seems to be incompatible to UWP apps... Maybe because of they are sandboxed and can't start new processes?
The app won't be published on windows store
I can add all needed capabilities
Android
It's an app that remotly commands the UWP app
Selenium integration compiled but execution blocks on "webDriver.get(url)"; I did'nt find a way to make it work yet.
I'm flexible concerning software/os/browser/libraries/etc to use.
The UWP & Android Apps are kinda complexe (they have many file...)
I don't know how to install a browser on the IOT Core (did'nt find an msix or appxbundle I could use)
Some ideas I had:
- Deploying the ARM7 chromedriver with a portable ARM7 chromium with the app
- Using dockers
- Using raspbian & mono
The ideal solution would be simple and working on android (if possible)...
Any of you have an idea of how I could do that?
I finally found a solution. I reproduced the desired behavior in Android using a WebView and javascript using the evaluateJavascript method.
It's a little tricky but perfect for my need.

Is there any way to automatically perform test cases on an android application?

Is there any way to automatically perform test cases on an Android application?
When you finish an android application, you need to test all of the features of the app, in other words you need validation. But since there are so many tests which need to be performed, you need something like a robot to test all of the features.
This is important especially when you have some changes in the code in the future. So all test cases should be repeated and it takes a long time to manually perform such tests.
How do you validate your app? Do you have a robot to automatically perform test cases or you do it manually?
Yes, we can preform automation testing of android mobile application using tool Appium and Selenium. Most imp thing is that Appium and Selenium are open source.
Using appium we can perform automation testing for this we required followings.
Appium Server.
http://appium.io/
Selenium Stand-alone Web Driver.
enter link description here
Java or python or ruby and many more but given are popular.
Debug apk and android studio
Android real device
Java client
enter link description here
Any IDE such as Android studio or eclipse.
After that we have to set environment in windows or mac application and we have write script to for each functionality.
It is easy to write and use. I guess it was help full and download link are given.

iPhone Automation for 3rd party/built in apps

I'm trying to find an automation framework for iOS and/or Android that allows me to automate actions on a real device using 3rd party/built-in apps. For example, I want to be able to automate: Browse these websites with Safari, watch these videos with the Youtube app, et al.
The automation frameworks I've encountered in my search seem to be focused on testing out your own app, in which you provide hooks in your own code to the framework in question.
I won't be testing out my own app (I'm testing out a proxy that the devices send traffic through), and thus won't have access to the source code to the apps on the device. I'm new to this, apologies in advance if there's a way obvious answer right under my nose.
For android automation you can use UIAutomator. It doesn't require source code. It uses in built uiautomator jar file which is present in android SDK. For more information you can refer http://developer.android.com/tools/testing-support-library/index.html

How can I automatically test the functionality of iOS and Android applications?

I have to regularly test the availability and functioning of a movie rental website. I wrote a Windows program which is able to automate a web browser according to a script, so this task is basically solved. Now I have to automate the mobile version of this web application: a native iOS app and a native Android app.
These apps are closed source, so cannot be modified in any way. I think the test app should be deployed on the test devices (iPhone, iPad, Galaxy Tab, Galaxy S II), but I must be able to remote control it. I mean, I would like create a connection between the test devices and a PC, upload test scripts from the PC to the devices, run them, and download the test results to the PC. The test script should start the app to be tested, manipulate its GUI (fill editboxes, push buttons etc.), and follow its response somehow, for example by analyzing the GUI (the existence of some GUI elements, their caption, etc.), analyzing screenshots, and/or inspecting IP packets.
I wrote lots of similar test programs for Windows: I used ShellExecute, PostMessage, FindWindow, the WinPcap library etc., so I know how such a program should work. But since I never wrote applications for mobile OS's, I don't even know whether there are similar APIs and libraries for iOS and Android.
I would like to know where to start, I mean, which SDKs and developer tools could be used to write such an application. I'm also interested in commercial solutions. I would really appreciate any help.
I like "Calabash-iOS/Calabash-Android" by LessPainful. That is the best for me.
free
available on iPhone and Android
record and playback
test on native and simulator
They doesn't have a GUI IDE. They are Ruby-based solutions and it is very easy to write test case script, like this:
Then I swipe left
And I wait until I don't see "Please swipe left"
And take picture
Also it can be
Then I touch the "login" button
to tap a button, or
Then I fill in "placeholder" with "text to write"
to write something to a textbox.
And the script can be shared by Calabash-iOS and Calabash-Android. That feature is convenient for developers who make both iPhoneApp and Android App.
I thought MonkeyTalk was nice but actually unstable, at least in my environment.
Sometimes MonkeyIDE crashed, so we have to do debug of MonkeyTalk...
I hope this helps you.
MonkeyTalk looks promising. Features from the Gorilla Logic website:
Free & Open Source
Automated testing of iOS, Android, HTML5 and Adobe Flex applications
Cross-platform recording and playback
Test native, web, or hybrid apps, on iOS simulators, Android
emulators or real devices (no jailbreaking required)
Everything from simple "smoke tests" to sophisticated data-driven
test suites
Packet tracing: iOS, Android, Android
Selenium offers drivers for mobile devices and emulators. It is a Google project. They have good documentation. It has an IDE for rapid prototyping of testing suites and support for many languages like ruby, PHP, c#, etc.,
If scripting is your preffered solution on android you can easily import and run scripts after you install the Scripting Layer for Android. Just download the latest apk file, import the script and run it. This isn't available on iOS but half of your problem may be solved with this.
I know this is an old post but any one reading in 2016 first choice for automation should be Appium ( works on both IOS /Android). All the tools mentioned above have to be built with the App. Appium does require any build up with App code. Its hugely popular with variety of programming language support ( PHP/JAVA/RUBY/PYTHON). [Link]: appium.io and [Link]: https://github.com/appium/appium

Best platform for programming to IPad and new Windows and Android Pads

would like to build an app that can run on any of the new PAD's hitting market.
I don't want to limit our users to a specific OS.
What is the best solution to allow all these pads to use our app.
The app needs to be able to run offline.
Thanks!
You could write a web application and use HTML5 for off-line caching.
http://diveintohtml5.ep.io/offline.html
Alternatively, you could try and use Titanium Mobile.
http://www.appcelerator.com/products/titanium-mobile-application-development/
You should also spend some time reading this discussions:
is-there-a-multiplatform-framework-for-developing-iphone-android-applications
technology-to-write-iphone-blackberry-and-android-phone-at-the-same-time
Have a look a MonoTouch, it will let you write all your logic in C# over all the main mobile platforms. However you still need custom UI code for each platform, but as least it will all be in C#.
(Better then having to use C#, Java and Objective C)
You could use Adobe Air that could works in most of Mobile/Tablet operating system Iphone,Android and Windows 7. but im not sure if Apple will approve your App if you plan to released to the App market.
Another way to think about it is to create an HTML resources and then integrated in away seems native to the system its more work but you will have a higher chance to get approved from apple and the app look more integrated with the OS .
The obvious -- and currently free -- answer is to use Adobe FlashBuilder to develop iOS apps. There is an iPhone and iPad emulator included. This does not use xcode, but you get most of the features to work with, and you can also develop Android apps from the same set of code. Further, with minor modifications for mouse usage, you can also have the apps run on any desktop as an Air app.
Adobe's website has detailed directions for how to create iOS apps on Windows with Adobe Air, though the most useful instructions for Air are from untoldentertainment.com.

Categories

Resources