Is it possible to automate NFC payment tests for Android? - java

I'm testing an app that supports NFC payments, however I was unable to find any solutions on automating these tests.
I'm using Appium as my open-source automation tool.
Fully automate NFC payments with desired variables.

It's not supported by appium neither any other framework. However, I have a solution for you. Have your app's developers add a menu for you with several choices, each choice represents a payment scenario from your design. Once you click on each one of them, it will mock the real NFC action. Make sure that this menu is only in debug mode and not in release mode.

Related

End to End BDD Testing , putting Web and Mobile native app automation is single framework

what would be best approach and framework to be designed for integration test case.
Is it possible to create single framework where and action done from UI is need to be validated on mobile native app and vice versa.
Eg : On Web Application I had enable one menu for user , now I need to verify whether that menu is visible for specific user on mobile app.
I wanted use selenium and appium for same , or is there any other way I can do this , what will be best practice , a sample code will be much helpful.

Is it possible to run test code written by other languages in flutter?

I am trying to automate my webview app by using Appium, but code that I exported from Appium is written in java. Is it possible to test flutter app by test code written in other languages, not in dart?
UPDATE: You can use Appium in conjunction with Selenium. I think that should work. See: http://appium.io/docs/en/writing-running-appium/web/mobile-web/
If what the test framework does is to integrate with, or emulate, a browser, and manipulate the DOM in order to test, and
If your Dart application only manipulates the DOM to generate a web view -- e.g., it would work in a regular browser without using plugins,
Then yes, you can use such a tool (like Selenium) to test a Dart app.
The caveat here is, if you are using a WebView to embed your app in a mobile app framework, then these tools will have to have the ability to open an app on a mobile device to access the WebView.
If you can create an alternate scaffolding for your application, such that it can also run in a browser, not only as an embedded WebView in a mobile app, then the tools needed to test it are only simple web app testing frameworks.
This is generally a good approach if you can get faster feedback deploying to a web server and running your tests, than packaging the app and pushing it to a connected device.
It doesn't obviate the need to test in the WebView as there are often differences between browser capabilities as embedded in a WebView versus in a desktop browser, but any differences found would be purely based on the capabilities of the browser, as opposed to problems in your Dart logic.

iOS UI automation testing

I'm a beginner in mobile iOS testing and I'm trying to write some tests, for example:
Click "Install" on intallation popup --> Check if app is installed on the device
But I can't find any tools that make possible to execute such test. So far I've been using Appium, but it requires app or bundleId to run tests. Is there any way to automate popups/browsing the device?
You can work with popups as simple IOS elements.
Or you can force appium to auto enable (or disable) any popup by adding appropriate capability (“autoAcceptAlerts”,true);

Testing Android Apps with hardware component

I am looking for tools to help with testing my android app. It contains a hardware component and so far our only method is manual; obviously this isn't optimal.
The app uses the phones camera & a hardware attachment. Normally I would look into espresso for UI testing and Junit for unit tests but I don't want to start and get nowhere.
An answer here would suggest testing tools, and how they get around the hardware and camera constraints.
How about calabash? (GitHub) You can basically automate the touches you would make manually. We use it here to simulate barcodes being entered from a external usb scanner.
I am currently working on an android app that talks to custom hardware. We ended up just mocking the interactions with the device for our espresso tests.

Using Eclipse to test intents in android

I have recently created an Android application that allows users to add shopping items and lists to a database and need to test its functionality. I have found information on testing whether certain TextViews contain the correct strings etc but that's about it.
I need to have a test project that actually adds food items and tests whether that was successful, I was thinking maybe:
Moving to the desired Activity
Filling out and submitting the form to add a shopping item
Move to the Activity containing all food items and their details
Check the item was added correctly
Is this possible to do using an Android test project in Eclipse? If not, are there any other useful tools available for this kind of testing?
Also, see android.testing.ActivityInstrumentationTestCase2<>. You can set up an Intent to be given to the activity under test using setActivityIntent(), then do getActivity() to start the activity under test. There are tutorials in the Developers Guide for learning how to use ActivityInstrumentationTestCase2.
Unfortunately, there doesn't seem to be much documentation for setActivityIntent(), and my guess is that it doesn't test intent filtering.
I think you should do it as unit tests. First ensure that your source Activity is issuing the correct intents by writing a test destination that simply logs all the incoming Intent data.
Then write unit tests for the destination, based on setActivityIntent(). You can also use
Robotium or MonkeyRunner (part of Android).
You cam use adb shell am to open a activity or send broadcast.
For example. You want to open a activity, the component of it is "com.test/.MainActivity". then you just need to type "adb shell -n com.test/.MainActivity".
I have asked around and a friend of mine told me a list of tools you can use to functionally test android application.
Freeware:
FoneMonkey
Robotium
Commercial products:
SeeTest
uTest
Perfecto Mobile
Test Center Enterprise Automation (Keynote Device Anywhere)
He recommended FoneMonkey as good enough tool for functional testing. I don't think you can implement functional tests for Android Application using only Android library testing tools without any third party extensions.
If you like to test your database, you can open File Explorer of ADT, save your database to other place and open by other database reader. (such as: SQLite Database Browser)

Categories