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

Saturday, March 15, 2014

How to fetch the Rally WorkSpace Reference


//Below code would return the list of Workspaces
private List<String> getWorkSpaceReferences() throws IOException {
List<String> workSpaceRefArray = new ArrayList<String>();
// Get Subscription Response
JsonObject subscriptionObject = getSubScriptionResponse();
// From the workspaces get all workspaces
JsonElement workSpaces = subscriptionObject.get("Workspaces");

// Check if the subscription contains multiple projects which are
// returned as an array
if (workSpaces.isJsonArray()) {
// TODO
} else {
// Get the single workspace
JsonObject myWorkspaceObject = workSpaces.getAsJsonObject();
JsonObject workspaceObject = myWorkspaceObject.getAsJsonObject();
// Get the workspace reference
String workspaceRef = workspaceObject.get("_ref").getAsString();
workSpaceRefArray.add(workspaceRef);
}
return workSpaceRefArray;
}

No comments:

Post a Comment