- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是我的代码:
import com.google.gson.JsonElement;
import com.rallydev.lookback.LookbackApi;
import com.rallydev.lookback.LookbackQuery;
import com.rallydev.lookback.LookbackResult;
import java.math.BigInteger;
import com.rallydev.rest.RallyRestApi;
import com.rallydev.rest.request.QueryRequest;
import com.rallydev.rest.response.QueryResponse;
import com.rallydev.rest.util.Fetch;
import com.rallydev.rest.util.QueryFilter;
import java.io.*;
import java.net.URI;
import javax.management.Query;
import com.google.gson.JsonObject;
public class dIterationPsiAutomation {
public String rallyURI;
public String appName;
public String username;
public String password;
public RallyRestApi restApi;
public LookbackApi lookback;
public dIterationPsiAutomation(String rallyURL,String username,String password, String applicationName) {
// TODO Auto-generated constructor stub
this.rallyURI = rallyURL;
this.appName = applicationName;
this.username = username;
this.password = password;
this.connect(this.rallyURI, this.appName, this.username, this.password);
}
public void connect(String uri,String app,String username,String password){
try //Unhandled URI Exception occurs here
{
this.restApi = new RallyRestApi(new URI(uri),username,password);
this.restApi.setApplicationName("v2.0");
this.restApi.setApplicationName(app);
this.lookback = new LookbackApi();
this.lookback.setCredentials(username, password);
this.lookback.setWorkspace("Workspace 1");
}
catch(Exception e){
System.out.println("Exception occured "+e);
}
}
public void getFeatureInfo(String featureName) throws IOException {
QueryRequest feature = new QueryRequest("portfolioitem/feature");
feature.setFetch(new Fetch("FormattedID","ObjectID","Name"));
feature.setQueryFilter(new QueryFilter("Name","=",featureName));
QueryResponse queryResponse = this.restApi.query(feature);
}
public void get_formattedID(JsonElement ObjectID){
}
public void get_prefixed_stories(String prefix){
try{
QueryRequest stories = new QueryRequest("hierarchicalrequirement");
stories.setFetch(new Fetch("Children","Name","Iteration","FormattedID","ObjectID"));
stories.setQueryFilter(new QueryFilter("Name","contains",prefix));
QueryResponse response = this.restApi.query(stories);
if(response.wasSuccessful()){
System.out.println(String.format("Total result count %d", response.getTotalResultCount()));
for(JsonElement result: response.getResults()){
JsonObject story = result.getAsJsonObject();
System.out.println(String.format("%s - %s: ObjectID: %s", story.get("FormattedID").getAsString(), story.get("Name").getAsString(), story.get("ObjectID").getAsBigInteger()));
get_all_leaf_stories(story.get("ObjectID").getAsBigInteger());
}
}
}
catch(Exception e){
System.out.println("Caught an exception in get_prefixed_stories method");
System.out.println("More details "+e);
}
}
public void get_all_leaf_stories(BigInteger oID){
try{
LookbackQuery query = this.lookback.newSnapshotQuery();
query.addFindClause("_TypeHierarchy", "HierarchicalRequirement");
query.addFindClause("_ItemHierarchy", oID);
query.addFindClause("Children", null);
query.addFindClause("__At", "current");
query.requireFields("Iteration","ObjectID","Name");
query.sortBy("Iteration", -1);
LookbackResult resultSet = query.execute();
if(resultSet.hasWarnings()){
System.out.println("Errors in lookback "+resultSet.Errors);
}
int resultCount = resultSet.Results.size();
System.out.println("Lookback resultset is "+resultCount);
}
catch(Exception e){
System.out.println("Lookback Exception "+e);
}
}
}
当我尝试使用 LBAPI 时,出现 IllegalArgumentException。有人可以帮我解决这个问题吗?
最佳答案
我认为 README for Rally-Lookback-Toolkit 中的示例通过名称指定工作区的方式具有误导性/错误:
lookbackApi.setWorkspace("myworkspace");
当我执行此操作时,我从 LBAPI 看到以下错误:
回顾异常 com.google.gson.JsonSyntaxException:java.lang.IllegalStateException:预期为 BEGIN_OBJECT,但在第 1 行第 1 列为 STRING
REST URL 中需要的实际上是 Workspace ObjectID
而不是名称。因此,如果您在代码中设置工作区 ObjectID:
this.lookback.setWorkspace("12345678910");
我认为该查询应该适合您。
关于java - Rally Java 回顾 API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21976325/
过去,我将 Rally 服务器上存在的一些图像合并到我的应用程序中——例如,我制作了一个更通用的“选择器”菜单,显示复选框,当然,复选框和框依赖于图像。 当然,当 SDK 版本更改时,我希望必须检查我
我有一个用户在集会中创建了一堆“故事”,而实际上它们应该是任务。有没有办法在 Rally 中将用户故事转换为任务?我已经搜索过 Rally 的帮助站点,但它似乎没有提供答案。 最佳答案 在 Rally
我需要修改默认的 Rally 看板应用程序以仅显示选定的迭代。我放入查询迭代下拉列表,然后添加: //基于迭代下拉列表构建查询 cardboardConfig.query = dropdownIter
如何在 Rally 中添加新的用户故事状态?即定义、完成、接受、自定义状态 最佳答案 拉力赛知识库文章“修改计划状态”: http://www.rallydev.com/help/modifying-
请谁能帮我解决这个问题,以下语法将如何出现在 Rally SDK 2 中或者您可以向我推荐一些相关文档,因为我找不到任何文档。 rally.function_name = function (rall
这似乎是一个非常基本的问题,但我在 Rally 中找不到它,所以就在这里,我在哪里可以找到拉力赛中的工作区和项目 OID? 最佳答案 为了其他可能想知道答案的用户的利益,这里有几种查找 OID 的方法
Rally 显然具有一些缺陷跟踪功能。 我的问题是;它足够好/足够灵活以作为组织的唯一缺陷跟踪器吗?或者在其他工具(如 Bugzilla 或 JIRA)中进行一般缺陷跟踪是否更常见? (可能使用 Ra
我创建了一个动态创建网格的应用程序,并允许用户通过“数字字段”编辑器对网格列之一进行更改。在调试环境中一切正常,但是当我尝试编辑 Rally 环境中的字段之一时,它会使应用程序崩溃。从它的外观来看,包
我正在尝试用 rally 组件做基本的 CSS。目前我正在努力让 xtype 'rallybutton' 与 xtype 'rallyiterationcombobox' 内联。我使用的 CSS 文件
鉴于表达式 {WorkProduct: {$in:[0001,0002,0003,...]} 我可以查询的项目数量有限制吗? 最佳答案 我们的 API 没有强制限制,但我们发送到底层引擎的整体查询必须
我想编写包含 Rally 问题(测试用例、缺陷等)链接的网页。我希望能够生成一个带有 FormattedID 的 URL。这可能吗?还是我真的需要objectID?例如: http://rally1.
如何查询我们所有可用项目的 Rally 实例? REST 调用的输出 https://rally1.rallydev.com/slm/webservice/1.29/subscription.js?f
我是 Rally API 的新手,只是在使用 Rally.RestApi 库创建任务时遇到了一些问题。我需要创建一个任务(使用 .NET)并将其与用户故事相关联(其中用户故事属于某个迭代)。 我是否必
我正在尝试创建一个应用程序,它将显示当前项目中的所有测试集及其通过/失败总数的状态。我面临的问题(顺便说一句,昨天刚开始学习 ExtJS 和 Rally SDK): - 我需要了解如何使用当前选择的项
我在外部开发时无法使用Rally.environment.getContext()。我需要在应用程序启动之前获取 ProjectOID 和 UserOID,因此我无法使用 app.getContext
我试图弄清楚如何通过 Cucumber 自动化脚本自动更新 Rally 中测试用例的测试用例结果。我希望能够运行我的测试脚本,然后该脚本将自动将 Rally 中的测试用例结果更新为“通过”或“失败”。
我们是一家使用 C#、Team Foundation Server 和 Rally 作为我们主要项目跟踪的商店。 我们想使用 Rally Item ChangeSets 来遵循 TFS Changes
我正在使用 Rally REST API 将来自 Rally 的用户故事数据集成到另一个应用程序中。我从 Rally 检索用户故事数据没有问题,但是,我想为其他应用程序的用户提供一个超链接,以便单击以
QueryRequest allreleases = new QueryRequest("release"); allreleases.setQueryFilter(new QueryFilt
我正在尝试使用 java Rally REST API 将图像文件附加到 Rally 中的测试结果(失败的屏幕截图)。图像文件附加到测试用例本身,但不附加到测试结果。试图提供 testCaseResu
我是一名优秀的程序员,十分优秀!