Skip to main content

Posts

STF (SeleniumTestsFramework) on maven repository

Since the commencement of  STF  it required installation of STF jar locally. This was a tedious process since for each new update of STF, the jar file should be installed locally. But not any more :-) I am happy to announce the release of STF to maven repository. To be able use STF you would need to add following dependency to you pom file -  Please refer maven central repo for  latest version  of STF jar < dependency >      < groupId >com.seleniumtests</ groupId >      < artifactId >seleniumtestsframework</ artifactId >      < version >3.0</ version > </ dependency > that's all, and maven will download STF for you. You can also download  Sample Selenium Project  which uses and illustrates STF features. In case you are a Selenium Beginners, then you should first begin with  Selenium Traini...

Do you need BDD style of system tests ?

BDD was largely introduced as a bridge between domain experts who are usually not technical users and Engineers who are supposedly no domain experts. BDD gives an ability to domain experts to describe application feature in Given, When, Then style and these are then turned in to real application feature by Engineers. All stakeholders have common reference of understanding. But it does not stop there, there was great value (and probably there is ) seen in writing system tests which follow BDD style. JBehave, Cucumber-JVM come on mind quickly. These APIs also help bridge the gap between technical and not technical user, but the questions we need to ask is - Would you be able to get product specialist write the feature files? If not then you would have two sources of information one written by product specialist (probably in JIRA or another tool) and another feature file written by developer or test engineer Will product specialists ever execute the test? Do y...

FAQ

Back to Appium Tutorial Index Element Location Strategy  -  Launch UIAutomationViewer as -  uiautomatorviewer & Following is an example for UIAutomationViewer and using it to find elements on Android App. Herein an image of UIAutomationViewer with calculator application -  The Element 64 can be identified as -  driver.findElement(By.name("64")); driver.findElement(By.id("com.android.calculator2:id/formula")); driver.findElement(By.className("android.widget.EditText")); Element location by TagName is deprecated. Refer Stackoverflow  post1  and  post2  for more on this. You can also use xPath strategy to identify element as described in this  post . Appium also supports  Mobile JSON Wire Protocol  locator strategy - -ios uiautomation : a string corresponding to a recursive element search using the UIAutomation library (iOS-only) -android uiautomator : a string corresponding ...

Executing appium tests on Android mobile web

Back to Appium Tutorial Index Having set up appium, lets run our first tests. But before that start the appium and android device /  emulator as following - navigate to appium installation, which is following on my Ubuntu - /home/tarun/node-v0.12.2-linux-x64/bin and start appium from command line or using Appium Desktop app ./appium Open another command prompt and execute - adb devices and you should see list of devices attached as - List of devices attached emulator-5554    device If you see any error message then re-verify all the steps mentioned earlier to make sure none of the step is missed Sample JUnit project to run tests on android emulator Clone the following appium project - git@github.com :tarun3kumar/appium-tests.git Import project in IDEA (or your favorite IDE) and Open AndroidEmulatorWebTest class - Right click on method testMobileWebOnEmulator and click Run. This would execute test on android emulator - ...

Set up an android device to run appium tests

Back to Appium Tutorial Index While emulators are cheap solutions to run automated tests on mobile device. They can not emulate behavior of real device. if your requirement is to run tests on a mobile chrome browser then you are better off using android device since chrome browser can not be installed on emulator. Following configurations are required to be able to run tests on mobile device - Download appropriate version of chrome browser on your device Enable to Developer Mode on device. For ex, to enable developer mode on moto-4.4.4 do following - Tap   Tap Settings Tap  About phone Tap the Build number field 7 times You will begin seeing a message as you approach the 7 touches Tap the back arrow once complete, and Developer options will now appear under Settings. Once the developer options are enabled under settings in Moto G, it will be there permanently. Hence it is not necessary to repeat these procedures again.You can also disable the dev...

Appium and Android setup

Back to Appium Tutorial Index Android Requirements Android SDK API >= 17 (Additional features require 18/19) Appium supports Android on OS X, Linux and Windows. Follow these directions for setting up your environment properly for testing on different OSes: linux osx windows Android setup does not differ greatly on different operating system. Let’s look at detailed setup instructions for Ubuntu  - Installing Appium app on MAC or Windows    installation-via-desktop-app-download Installing Appium on Ubuntu  - Install node.js (v0.10 or greater) - Since appium server is written in node.js, first node.js needs to be installed. Following this appium can be installed from npm - Setup with Ubuntu: curl -sL https://deb.nodesource.com/setup | sudo bash - Then install with Ubuntu: sudo apt-get install -y nodejs DON’T install node js using above method, it would result in following error when starting appium - error: Appium will not ...