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.
While developing an app I more and more stumble upon the fact that I need to run interaction tests where two emulators are running the app to ensure the entire integration is working by testing the interaction between those (and not mock one of the devices)
During research on the topic (which is quite hard to search for because I do not want to run the same tests on multiple devices) I found a couple of solutions, however none of them seem to integrate very well into an Android Studio workflow. Some tools I've found:
UiAutomator
UI/Application Exerciser Monkey
Appmium
Some blend of adb, ruby, python etc.
Some projects on github
My expectation may be off but is there no framework or tool with a similar level of integration like running an instrumented tests that allows me to connect to several devices and perform interactions on them together?
Some of those approaches above require out-of-the-tool tinkering with adb or require a lot of environment to be set up.
Good answer to this question here:
https://stackoverflow.com/a/49647422/14338677
In short:
1.Create communication proxy that will be between sender and receiver
2.Add build type autoresponder, and communication proxy code get empty if (!BuildConfig.AUTORESPONDER)
3.Install autoresponder app to emulator or device when you will be testing
4.Run another test app with Espresso that can communicate with autoresponder app
5.Use Thread.sleep(...) to wait response of autoresponder app
I an currently working on an AR app for Android using ARCore, and I'm asked to write automated tests for this app, but I have absolutely no idea how to test augmented reality. Are there any tools, frameworks, or just tricks to run proper tests?
Writing Automated test for an AR application is as good as writing Automated Tests for a native android application. You can use any open source frameworks or develop your own using appium with java or python, testNG, Maven etc. I used an open source framework called Robot framework (based on python) as it was good for my application and platform under test.
I researched appium too and unfortunately couldn't find anything specific to test and validate AR application.
The problem with me was "how to validate if the AR Experience actually showed up on the screen."
To validate this, as there was no resource identifier for the AR asset to validate if it is visible or not, i ran "adb logcat -b system com.android.my_app_packagename:E > testlogs.txt" command while i m performing the automation test and in place of validation point if the AR asset appeared or not, I parsed the "testlogs.txt" text file and checked for availability of the events if they have triggered in the logs while i performed the action. For this i need to ask my developers to log those events in the app while they developed it.
Hope this help.
I'm a relative PHP newbie (10 months) and Javascript absolute novice, so please go easy on me.
I've just started playing with Cordova and have a couple of small apps for use internally within our small business that I could really do with, but testing my code is causing me grief. I've been using Intel XDK with the built in simulator, but it can't simulate SQLite or the FileTransfer plugin.
At the moment, the only way I can see of doing this in XDK would be to compile the app and transfer it to my Samsung mobile for testing, but this seems very cumbersome and will lead to everything taking much longer. I've just found Apache Ripple, but didn't want to spend a day looking into it to find there's a better tool.
Is anybody able to point me at a tutorial page that gives the easiest method for testing a Cordova app with plugin support, please? I tend to work from about 4 different computers, so something web-based that means I can pull the latest version of my code from Google Drive and start working with no setup hassle would be excellent, if it exists.
Cheers
Andy
The Ripple Emulator has similar coverage as the Cordova Simulator. Unlike Ripple, the Simulator can be extended to support specific plugins, but it will require writing simulation code to make that happen. See the cordova-simulate project for details on how to do that.
Otherwise, the next best option (and the most accurate) is to build the app and use remote Chrome DevTools to debug the app (see this XDK doc page for some help with setting that up). It is not necessary to rebuild your app to make this work. If you structure your code so that you can redefine key functions using the JavaScript console, you can actually debug quite a bit without performing a rebuild and reinstall.
Use the interactive JavaScript console to redefine functions within your app and then run those redefined functions directly from the console or restart your app, in situ, using the window.location.reload() function. An example of using this technique can be seen in this video, starting at about 18:30. The video is demonstrating the use of the weinre debugger, but the debugging technique can also be applied to remote CDT when debugging a built app.
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