Technical Project Lead @ Huawei Technologies

My photo
Bangalore/Hyderabad, Karnataka/Andhra Pradesh, India
Have an overall 13 + yrs of experience Currently working as an Senior Architect.Expertise in design,implementation of Automation frameworks for Opensource automation tools like Selenium,Jmeter, Webdriver,Appium, Robotium Expertise in integrating Test & ALM Management tools like Rally,Qmetry,JIRA-Zephyr with Automation frameworks Expertise in design and developmenet Mobile Automation frameworks for tools like Appium, Robotium Remote Control,Cucumber BDD,Manual Testing

Followers

Friday, January 31, 2014

Inspecting IOS elements and recording tests using Appium on Simulator

1.Download & Install the GUI version of Appium server(check appium.io)
2.Open the Appium server. You should see some thing like below




















3. We would be inspecting the IOS element using this GUI version of appium
4. Check the flag AppPath an provide the path to your .app(you can find the path from Xcode)
Ex: The path I provided here is '/Users/kiran/Library/Developer/Xcode/DerivedData/UICatalog-fqsvdhmisheuvqbsuomezsujnqgi/Build/Products/Debug-iphonesimulator/UICatalog.app'
5.Ensure you pick the .app path which is in 'Debug-iphonesimulator' folder and not 'Debug-iphoneos folder (when you run the UICatalog code on a real device from Xcode, the .app will be created in 'Debug-iphoneos).
6.Now click on 'Launch' button to start the appium server.
7.Click on 'i' button to launch the IOS inspector
8.Check the below video to see how to inspect elements on IOS simulator and record the tests

You can even play back  the tests with in the appium recorder
Check the following video link to have a glance on how to inspect and record
https://www.youtube.com/watch?v=BNgFixhS_AM&feature=youtu.be

You can run your tests either starting the appium from GUI mode or from terminal mode.
Now lets c how to run the tests when appium is launched from terminal
Stop the GUI mode appium server
open the terminal and type the command appium &. This will launch the appium server on default port 4723


Tuesday, January 28, 2014

Rally API integration with Java

Recently I worked on Rally API integration with our Java Automation framework .Rally is the ALM (Application Life Management tool) . In this blog I would be posting my experiences in Integrating Rally API and the context would be more on Test Management

Rally exposes some webservices typically REST services that allows user to Manage the Test Management. To access the webservices Rally does not provide any API. How ever there are many open source Rest Clients for Java,C#,python.....

I used Java Rest Client to access the Rally REST services you can download the libraries from the link
https://github.com/RallyTools/RallyRestToolkitForJava

How to update the test cases in rally with our Automation Test case results

Will soon post the BLOG...

How to create a Test Case using Rally Rest API

Will soon post the BLOG

How to Query for list of Test Cases using Query Filter

Will soon post the BLOG

How to Login in to Rally using Java Rest API client

To access to Rally you need to login authentication
public RallyRestApi authenticate() throws URISyntaxException, Exception {

            //Provide Rally url,username and password
            RallyRestApi restApi = new RallyRestApi(new URI(https://us1.rallydev.com),
"username, "password");

          //If you are behind a proxy server provide the following
            restApi.setProxy("proxyserver", "userName", "password");
try {
if (restApi == null) {
LOGGER.debug("Authenticating Rally with provided credentials");
System.out.println("Initializing Rally Connector with user : "
+ userName);
LOGGER.debug("Trying to connect and login to rally : ");
restApi = new RallyRestApi(new URI(rallyUrl), userName,
password);
QueryRequest userRequest = new QueryRequest("User");
// userRequest.setFetch(new Fetch("UserName", "Subscription",
// "DisplayName"));
userRequest.setQueryFilter(new QueryFilter("UserName", "=",
ReadProperties.getInstance().getProperty("username")));
QueryResponse userQueryResponse;

userQueryResponse = restApi.query(userRequest);
JsonArray userQueryResults = userQueryResponse.getResults();
JsonElement userQueryElement = userQueryResults.get(0);
JsonObject userQueryObject = userQueryElement.getAsJsonObject();
String userRef = userQueryObject.get("_ref").toString();
LOGGER.info("Rally Authentication Successful!");
}
} catch (Exception e) {
LOGGER.error("Failed to Authenticate User [" + userName + "]"
+ e.getMessage());
e.printStackTrace();
}
return restApi;
}

Thursday, January 9, 2014

Inspecting IOS elements using Appium Inspector for .app file

  1. Launch the appium Server (GUI version)
  2. You need to setup additional Parameters using to run the tests on Real Devices
  3. Choose the app path. Here you need to choose from Xcode iphoneos folder as mentioned in one of my previous blog ex: /Users/kiran/Library/Developer/Xcode/DerivedData/UICatalog-fqsvdhmisheuvqbsuomezsujnqgi/Build/Products/Debug-iphoneos/UICatalog.app
  4. Check the option UDID. UDID is the device ID. You can find it from Xcode Organiser.
  5. Open xcode. Open organiser which is on top right of your Xcode
  6. Select you device in the left list of the organiser
  7. You should be able to see the device information
  8. Here Identifier is the UDID.
  9. provide this is identifier in the appium server option UDID
  10. Select option Force Device with selected option as iPhone
  11. Select option BundleID. This is the application bundle id. To find this Id follow the below screenshot
  1. I used Iphone configuration utility(freeware) to find the app bundle path. Google it and your should be able to find the download references
  2. Open the Iphone config utility, Under Application you should be able to see the app bundle id. In this case, 'com.yourcompany.UICatalog'. Set this to the appium server option 'BundleID'
  1. Start the appium server
  2. Click on Inspector Icon
  3. You should see your Iphone Screen in the Inspector