Sunday 22 May 2016

differencce between mobile and web app testing

What the difference between web testing and mobile
application testing
Question Submitted By :: Mobile Testing
I also faced this Question!! Answer Posted By
Answers were Sorted based on User's Feedback
Answer
# 1 Jotted some of the test coverage we need to focus on mobile testing which differed from web testing.

1. Interrupts : How app responds when it has interrupted by calls,SMS,alerts or Wi-fi change when the app is running.App should regain it's state after the interruption.

2.Mobile apps execute on the limited hardware resources and make sure that there is no hangups or performance issues.

3.Cross platform and cross devices :
App should be tested on different OS and Different devices for same issue(Android: MOTO G,Nuxes etc)

4.UI components loading,component locations while device is in different orientations.

5. Push notifications : Mobile apps works on push notifications whereas pc web applications doesn't have such concept.

6. Crash scenarios also need to be taken care when app is running.

Thursday 19 May 2016

string function

String userInput = "Hello, World! ssss1££$$%%##";
    //    String onlyAlphaNumeric = userInput.replaceAll("[^a-zA-
Z0-9]", "");
       
        //only num
    //String onlyAlphaNumeric = userInput.replaceAll("[^0-9]", "");
        //num and alpabets
                String onlyAlphaNumeric = userInput.replaceAll("[^a-zA-Z0-9]", "");           
        System.out.println(onlyAlphaNumeric);

Saturday 14 May 2016

desire capabilities appium

Capability Description Values
automationName Which automation engine to use Appium (default) or Selendroid
platformName Which mobile OS platform to use iOS, Android, or FirefoxOS
platformVersion Mobile OS version e.g., 7.1, 4.4
deviceName The kind of mobile device or emulator to use iPhone Simulator, iPad Simulator, iPhone Retina 4-inch, Android Emulator, Galaxy S4, etc…
app The absolute local path or remote http URL to an .ipa or .apk file, or a .zip containing one of these. Appium will attempt to install this app binary on the appropriate device first. Note that this capability is not required for Android if you specify appPackage and appActivity capabilities (see below). Incompatible with browserName. /abs/path/to/my.apk or http://myapp.com/app.ipa
browserName Name of mobile web browser to automate. Should be an empty string if automating an app instead. ‘Safari’ for iOS and ‘Chrome’, ‘Chromium’, or ‘Browser’ for Android
newCommandTimeout How long (in seconds) Appium will wait for a new command from the client before assuming the client quit and ending the session e.g. 60
autoLaunch Whether to have Appium install and launch the app automatically. Default true true, false
language (Sim/Emu-only) Language to set for the iOS Simulator e.g. fr
locale (Sim/Emu-only) Locale to set for the iOS Simulator e.g. fr_CA
udid Unique device identifier of the connected physical device e.g. 1ae203187fc012g
orientation (Sim/Emu-only) start in a certain orientation LANDSCAPE or PORTRAIT

appium code for rotation

  • //Launch the application
  • driver.rotate(landscape);
  • //Perform some desired actions and again switch to portrait mode
  • driver.rotate(portrait);
  • //Continue the test
  • //Launch the application
  • driver.rotate(landscape);
  • //Perform some desired actions and again switch to portrait mode
  • driver.rotate(portrait);
  • //Continue the test
  • - See more at: http://findnerd.com/list/view/How-to-perform-the-screen-rotation-in-Appium-/12414/#sthash.9vr05rZG.dpuf
  • //Launch the application
  • driver.rotate(landscape);
  • //Perform some desired actions and again switch to portrait mode
  • driver.rotate(portrait);
  • //Continue the test
  • - See more at: http://findnerd.com/list/view/How-to-perform-the-screen-rotation-in-Appium-/12414/#sthash.9vr05rZG.dpuf
  • //Launch the application
  • driver.rotate(landscape);
  • //Perform some desired actions and again switch to portrait mode
  • driver.rotate(portrait);
  • //Continue the test
  • - See more at: http://findnerd.com/list/view/How-to-perform-the-screen-rotation-in-Appium-/12414/#sthash.151w8far.dpuf
  • //Launch the application
  • driver.rotate(landscape);
  • //Perform some desired actions and again switch to portrait mode
  • driver.rotate(portrait);
  • //Continue the test
  • - See more at: http://findnerd.com/list/view/How-to-perform-the-screen-rotation-in-Appium-/12414/#sthash.151w8far.dpuf