Is there a way to sort 500 test cases in test run (KIWI TCMS) - kiwi-tcms

We have test runs with several hundred test cases. We can sort them manually but it is very inconvenient and time consuming. Is there any other way to do that?

Could you elaborate on what exactly you want to sort?
You can achieve some things via GUI but currently the most powerful way to manipulate (bulk edit) test cases is via the Kiwi TCMS API.

The order in TR comes from the order inside TestPlan where you can reorder the test cases (top-right corner). If you need something in particular then you have to describe it.

Related

Any examples of using a Wandsearcher in vespa ? (After a weighted set query)

Currently i am using the REST interface to query vespa, which seems to work great but something tells me that i should be using searchers in the application to make the client(server side code) a bit lighter (bundle the jar file in the application package) to make it a bit smoother. I have managed to do some simple searcher/processor applications. But this is a bit overwhelming.
So are there any readily available examples ?
Basicially i want to:
Send to /search?query=someId
Do a ordinary search for the weighted set on this documentID (I guess this one can be handy: https://docs.vespa.ai/documentation/reference/inspecting-structured-data.html)
Take those items in the response and add it to a wand item(s) and query for a wand with wandsearcher on a given field. Similar to the yql:
"select * from sources * where wand(interest, some weightedsets));","ranking":"combined_score" and return the matches.
Just curious also, apart from the trouble of string building with the http request i am doing at the moment are there any performance gains of using a searcher or go the java route vs rest?
thanks for any insight or code help i can start with.
There is an example of using the WandItem (YQL wand)here https://docs.vespa.ai/documentation/advanced-ranking.html and see also https://docs.vespa.ai/documentation/using-wand-with-vespa.html as there are two wand implementations available in Vespa, it sounds from the description that the wand() is what you want to use for this use case. For the first call you probably want to have a dedicated document summary to reduce the amount of data fetched for your first query and also the option of serving it out of memory only (See https://docs.vespa.ai/documentation/document-summaries.html)
Also see https://docs.vespa.ai/documentation/searcher-development.html as a general resource on writing searchers.
For your use case it makes a lot of sense to write a searcher to perform these two queries as your second query depends on the first and you avoid the cost of rendering/http/yql parsing which might matter if your client is remote with high network latency.

are branching journeys possible in gatling

Is it possible for a Gatling journey to contain branches or to stop at certain steps with a given probability? I've had a bit of a look and it looks like journeys are static but I can't see anything obvious to say that these things aren't possible.
Looks like it is possible with Gatling's doIf, doIfEquals, doIfOrElse etc. See https://gatling.io/docs/2.3/general/scenario/ for details.

How to call Cucumber scenario using beforehook in another scenario

I'm using protractor with cucumber.
I have a scenario in which I need to call one other scenario as the pre-condition.
Pattern is like this:
Scenario1 :
#test1
Scenario: first scenario
Scenario2 :
#test2
//Need to call the first scenario as the pre-condition
Scenario: second scenario
Here, I want to use the cucumber hook.
So, my hook file is like this:
this.Before({tags: ["#test2"]}, function (event, callback) {
console.log('call the first scenario');
this.feature(tags: ["#test1"]);
callback();
});
Can somebody tell me how can I do
"this.feature(tags: ["#test1"]);"
In Cucumber you do setup using a Given.
In your case you need to write a Given that does what your first scenario does. The question now becomes how do you do this elegantly
If you implement all step definitions as single calls to helper methods this becomes fairly easy. As each step definitions is just a single call you can turn scenario 1 into a series of calls e.g. foo, bar, baz
Now for scenario 2 and its given you write a new method scenario 1 that just repeats the calls e.g.
def scenario1
foo
bar
baz
end
By doing this you have taken the problem out of Cucumber and into the programming language you are implementing your steps. This approach has a bit of a steep learning curve, you have to
Learn how to write helper methods in the language of your choice
Learn how to share helper methods between your features
I can't help you with that as you are using JAVA and I use Ruby. I do know its much more complicated in Java than Ruby. However its definitely worth learning how to do this, as this will give your the ability to make all of your cukes simpler, and give your opportunities to make them faster as well.

look up input field webbrowser C language

This is in C Language
I want to know how i can write a program to lookup all the input fields of a website. Any website. and then can fill them in. I can write the simple webbrowser in vbs but how can i analyse the input fields. even better would be is i could click the lookup field and it puts the name of it in a box..... that would be ideal.
Anyone can help? thanks :)
Are you sure you want to do this in C?
I ask because it is not easy. First of all, you need to be able to run the HTTP GET request against the webpage you wish to view. For this, you probably need libcurl; you definitely don't want to be writing from scratch at any rate.
Next, you need to process the html you get, finding all input fields. You do NOT want to do this using regular expressions, if anything for the sake of bobince's blood pressure. HTML is not a regular language is the bit you need to take away - you need an xml parser. Enter libxml. I'm sure there are other xml libraries out there, and even libraries for parsing html.
Finally, having done that (got the fields etc) you need to be able to populate them and submit the correct request as per the ACTION and METHOD parameters of the FORM.
This is of course assuming you know what the fields should be formatted with. And it also assumes nothing else is going on. If you have a javascript validated web form (I sincerely hope they're validating on the request too, but they might provide feedback via JS) you won't benefit from that (unless you're going to integrate JS, in which case you might as well write a browser).
This is not a trivial task and it is the reason there are accessibility standards for HTML, because otherwise it becomes tricky to interpret the form without human interaction.
Of course, this all assumes said html is well formed, which isn't always the case...
I might suggest another approach. BeautifulSoup is a well known Python web scraping library that works very well. Python as a language allows easier string manipulation too, which will dramatically cut down your development time. I'd suggest giving the need to use C some serious thought given the size and complexity of the task you want to undertake vs your need to get a result quickly. If you have a lot of time, by all means go for C.

How to find and tail the Oracle alert log

When you take your first look at an Oracle database, one of the first questions is often "where's the alert log?". Grid Control can tell you, but its often not available in the environment.
I posted some bash and Perl scripts to find and tail the alert log on my blog some time back, and I'm surprised to see that post still getting lots of hits.
The technique used is to lookup background_dump_dest from v$parameter. But I only tested this on Oracle Database 10g.
Is there a better approach than this? And does anyone know if this still works in 11g?
Am sure it will work in 11g, that parameter has been around for a long time.
Seems like the correct way to find it to me.
If the background_dump_dest parameter isn't set, the alert.log will be put in $ORACLE_HOME/RDBMS/trace
Once you've got the log open, I would consider using File::Tail or File::Tail::App to display it as it's being written, rather than sleeping and reading. File::Tail::App is particularly clever, because it will detect the file being rotated and switch, and will remember where you were up to between invocations of your program.
I'd also consider locking your cache file before using it. The race condition may not bother you, but having multiple people try to start your program at once could result in nasty fights over who gets to write to the cache file.
However both of these are nit-picks. My brief glance over your code doesn't reveal any glaring mistakes.

Resources