Archive

Archive for February, 2015

Do you want to test/learn how to do automation in Hybrid apps ?

February 26, 2015 Leave a comment

Hello again,

Today I will post 2 projects ios and android, a sample of Hybrid app.

I found this sample project to you download and start do test calabash with them.

Example Hybrid App: https://github.com/moovweb-demos/igadget-phonegap

– After download them, you can follow some instructions to install:

https://azevedorafaela.wordpress.com/2013/12/19/cucumber-and-calabash-ios-automation/

&

https://azevedorafaela.wordpress.com/2014/07/09/calabash-android-install-example-project/

– And to find elements inside the webviews:

https://azevedorafaela.wordpress.com/2014/07/28/summary-of-calabash-ios-ruby-api-query/

Just download them and start do/learn automation in hybrid apps ūüôā

Thank you, see you next week guys !

Using different emulators with Chrome in C#

February 18, 2015 2 comments

Hi guys, Today I will post a sample code that you can use to test different screens/mobile devices/browsers using Google Chrome browser with C#. You will need change the bold words for the devices and sizes that you want to simulate.

private static ChromeOpt SetCapabilities()
{
Map chromeOptions = new HashMap();

DesiredCapabilities capabilities = DesiredCapabilities.chrome();  capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);


switch (whichCase) {


case "byDevice":
Map mobileEmulation = new HashMap();
mobileEmulation.put("deviceName", "Apple iPhone 4"); //Should be the same name showing in the Chrome Device Emulator
chromeOptions.put("mobileEmulation", mobileEmulation);
break;

case "CustomScreen":
Map deviceMetrics = new HashMap();
deviceMetrics.put("width", 900);
deviceMetrics.put("height", 600);
deviceMetrics.put("pixelRatio", 3.0);


Map mobileEmulation = new HashMap();
mobileEmulation.put("deviceMetrics", deviceMetrics);
mobileEmulation.put("userAgent", "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19");
chromeOptions.put("mobileEmulation", mobileEmulation);


break;

}

}
IWebDriver driver =new ChromeDriver(capabilities);
return driver;
}

You can look the list of user agents here:

http://www.useragentstring.com/pages/useragentstring.php

If you have any thoughts/suggestions please leave your comment here ūüôā

Thank you guys !

How to install SafariLauncher to run appium ?

February 12, 2015 9 comments

Hi guys,

I am going to write about “How you can install the framework of safari to run appium tests”. If you need run tests in safari of real devices with Appium, you can use this framework for ios devices (Android it is more easier as always). So, you need to have an apple developer account.

-> Plug your device

-> Git clone this project: https://github.com/budhash/SafariLauncher

-> Add your device in your developer apple register.

https://developer.apple.com/account/ios/device/deviceList.action

-> Download your certificate and your mobile provisioning profile after

https://developer.apple.com/account/ios/certificate/certificateList.action

&

https://developer.apple.com/account/ios/profile/profileList.action

-> Install your mobile provision in your device (or double touch on the file)

-> Put in blundle id com.safariLauncher.safariLauncher -> inside of the general properties of the project

-> Check if you are deploying in the right version of ios.

-> Run the project

-> Don’t forget to set the capabilities in your automation project:

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("appium-version", "1.3.1");
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("deviceName", "Tahir's iPhone");
capabilities.setCapability("udid", "your_udid");
capabilities.setCapability("bundleId", bundle);
capabilities.setCapability("browserName", "safari");
driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);    

driver.get("http://www.google.com");
Thread.sleep(20000);

Once you have deployed the safari launcher to the device, everything should be configured correctly so that the next time you run ./reset.sh on appium, the installation of the safari launcher app should succeed.

See you next week !

Test your app and raise your chances to keep in the market

February 5, 2015 Leave a comment

Hi guys, today I will summarise and translate a slide of Elias Nogueira, who is a Tester Consultancy in Brazil.

– Only¬†in android there are 18,798 devices and it is growing…

РYou can see the most used android devices of your country in 2014 on this link: http://opensignal.com/reports/2014/android-fragmentation/

Р7 different platforms (android only): 

graph table

 

 

CHALLENGES ?

Simulators: Many apps can be test in simulators without need spend money buying real devices. Most of them are free, but this is the most far option from the real environment. Examples: Genymotion, Developer tools inside Chrome, XCode Simulator.

Cloud Testing: You can test the apps thought the web. The application can be tested, managed and installed. They are safer for the tests and you can simulate in real devices, but normally they are expensive. Examples: Xamarin, Testdroid, Appthwack.

Real Devices: It will bring realistic results and you can manage the device physically if you need, but you will spend lots of money if you need test in many devices and versions of Android. (It is impossible you test all devices)

 

WHAT TEST ?

–¬†Compatibility: all restrictions of the device

РOperational: installation, update, backup, access to the resources

РFunctional: business rules and input of data

РUsability: locale, navigation off/on line, navigation of tables

РPerformance: network, exchange files, battery usage

–¬†Available:¬†restrictions in the utilization of resources

 

SOME IDEAS

graph

HOW TEST?

РManual: Straight on devices, simulators and Crowdtest.

РAutomated: Straight on devices, simulators and the cloud.

 

TECHNOLOGIES

– Appium, Calabash, Robotium, Selendroid, MonkeyRunner, MonkeyTalk, UIAutomator, Espresso

 

 

Thank you ūüôā

 

Resources: http://www.slideshare.net/elias.nogueira/teste-sua-app-e-aumente-as-chances-de-mantla-no-mercado

http://opensignal.com/reports/2014/android-fragmentation/

%d bloggers like this: