Get Test Sets in an Iteration with REST api - rally

I am working with the Rally REST API's, version 3 beta.
How do you to get the list of Test Sets in a particular Iteration?
For other entities I'm working on, I am finding it easy to navigate the tree as there is a URL to the collection as part of the parent. Test Sets appear under an Iteration in the UI but do not seem to fit anywhere in the object graph in the web services.
This is as far as I got:
https://rally1.rallydev.com/slm/webservice/v3.0/testset
?workspace=<workspace ref>
&project=<project ref>
&query=(Iteration.Name="Sprint 82")
But it gives an error: Could not parse: Unknown operator ")"
If I remove the parenthesis, it can't parse the expression.

Try putting spaces around the = operator:
query=(Iteration.Name = "Sprint 82")

Related

Algolia vue-instantsearch : disjunction between two distincts facets

Using algolia vue-instantsearch, i’m encountering a special case and i’m having an hard time finding a solution.
Refinement behaviors is that you get the results that matches all your refinement filters.
If i filter on a brand and a price, i’ll get the results that matches both the brand and the price.
I need to add some specific filters that work differently. I would like to be able to say “returns me the results that matches either refinementA, or refinementB, or refinementC.”
The reason is that those refinements are checking fields that are not present on all the products.
If i check a value for refinementA, i want to keep all the results that has no value for field corresponding to refinementA, but remove those that has a value for refinementA that does not match with the one i filtered one.
Im thinking about handling myself some inputs instead of ias-components, and modifying by hand each query that is send to algolia by checking the value of my own inputs when searchFunction is triggered (https://www.algolia.com/doc/api-reference/widgets/instantsearch/js/#widget-param-searchfunction).
I did not found yet how i can trigger a search from an non-vue-instantsearch input event, and i’m not sure how the above solution could affect the internal working of vue-instantsearch.
I’m looking for feedbacks about a more standard way of doing this, or for any advices !
I got the answer by exchanging with a vue-instantsearch maintainer.
vue-instantsearch does not provide any option to do it.
A workaround is to overwrite algoliasearch search method, that is used under the hood by vue-instant-search.
const client = algoliasearch('', '');
const originalSearch = client.search;
client.search = function search(queries) { ... }
More informations in this github issue : https://github.com/algolia/vue-instantsearch/issues/1102

how to get JSON data from an API in robot framework

I am trying to get JSON data from an API in robot framework which has data with id's. I have to get the count of id's present in the data obtained from the API.
I have tried the below code:
${result} = get ${API_JSON_PATH}
Should Be Equal ${result.status_code} ${200}
${json_data} = Set Variable ${result.content}
Log ${json_data}
I am getting the below mentioned error:
No keyword with name '${result} = get' found.
Is the approach correct or is there any other better ways for getting the JSONS data?
I'm using the RequestsLibrary and it's slide different from what you are doing.
the credential are not needed in your case but this is the example:
#{credential}= Create List Your_Username Your_Password
Create Session YOUR_API_ALIAS YOUR URL auth=#{credential}
${api}= Get Request YOUR_API_ALIAS YOUR_URI
if you want get the content of the JSON:
${api.json()}
Documentation: https://bulkan.github.io/robotframework-requests/
You need to have two or more spaces after the =. Robot looks for two or more spaces to find keywords and arguments, so it thinks your first statement begins with the keyword ${result} = get. Since that's not a valid keyword, you get that error.

Openrefine not working as expected

I'm very new to OpenRefine, so please bear with me if i have made a simple mistake.
I'm parsing a HTML website to gather some date.
Everything went fine with fetching the individual pages, but now the parsing of the HTML fails.
I'm creating a new column, based on the one holding all the page's HTML. I'm trying to get to the data in a specific DIV[20].
In the"create column based on this column" window it gives me a preview when using value.parseHtml().select("DIV")[20] , which results in exactly what i need... executing it gives me nothing but blank cells.
it even tells me that it is "filling 0 rows with grel:value.parseHtml().select("DIV")[20]"
Any clue what i'm doing wrong here?
You just need to finalize with .toString() to output the JSON.org object AS a string.
This is explained on our wiki here: https://github.com/OpenRefine/OpenRefine/wiki/StrippingHTML#extract-html-attributes-text-links-with-integrated-grel-commands
I also updated the select() function with that example: https://github.com/OpenRefine/OpenRefine/wiki/GREL-Other-Functions#selectelement-e-string-s

How to check how many specific HTML elements are in a page using RSpec?

In Rails 4 feature spec, using RSpec 3 and Capybara, how do I assert if a certain number of specific tags are present in a page?
I tried:
expect(find('section.documents .document').count).to eq(2)
But it doesn't work, saying:
Ambiguous match, found 2 elements matching css "section.documents .document"
Also, is it a good idea/bad practice to test in a feature spec something so specific as the kind of tags and classes used in the view?
The problem with using find is that it is meant to return a single matching element. To find all matching elements, which can then be counted, you need to use all:
expect(all('section.documents .document').count).to eq(2)
However, this approach does not make use of Capybara's waiting/query methods. This means that if the elements are loaded asynchronously, the assertion may randomly fail. For example, all checks how many elements are present, the elements finish loading and then the assertion will fail because it compares 0 to 2. Instead, it would be better to make use of the :count option, which waits until the specified number of elements are present.
expect(all('section.documents .document', count: 2).count).to eq(2)
There is some redundancy in this code and the assertion message will be a bit strange (since there will be an exception rather than a test failure), so it would be better to also switch to using have_selector:
expect(page).to have_selector('section.documents .document', count: 2)

Custom Grid Query in Rally with Multiple OR Clauses

I'm trying to write a query in Rally that will show me all the defects for several projects, but every time I save the query I get the message "Could not parse: Error parsing expression -- expected ")" but saw "OR" instead."
Here is the actual query:
((((Project.Name = "Project A") OR (Project.Name = "Project B")) OR (Project.Name = "Project C")) OR (Project.Name = "Project D"))
I checked Rally's so-called Help and it seems to me that everything is set up correctly, but maybe I'm missing something?
Your query syntax and parentheses groupings look fine. I tested your exact string above in a Custom Grid and it parses fine - no "Could not parse..." error. Maybe compare the exact query you are using against your sample above? Complex AND's and OR's can definitely be frustrating. If you miss a parenthesis or spaces around operators, the query engine will complain.
fyi, I just found that doing a page reload in the browser forces the changed query expression to be evaluated, whereas simply saving the modified query does not reliably re-evaluate the changed query.
The symptom I observed was that query results continued to complain about the previous query string, even though I had replaced parts of the query with different named fields, etc. This made me suspect browser caching, and when flushing cache did not help, then I did browser page reload, which worked perfectly.
So if your browser page was reloaded between when you were having the problem and later when it started working, then this might explain why.
From About link: Rally Build: master-9274 , Browser Type: firefox/19.0, rv:19.0