Karate: Is there a way to mask console logs of a specific scenario? [duplicate] - hide

This question already has an answer here:
Karate api testing - I would like to mask param values
(1 answer)
Closed 1 year ago.
I have some sensitive information in my test scripts, while executing the tests those are printing in the console log do I would like to mask console log for a specific scenario alone.
Please let me know if possible. I have looked at the example given in github but it doesn't help much as it's not clear.

Yes, please refer the documentation here: https://github.com/intuit/karate#report-verbosity
And if you use the tag #report=false for a Scenario (or even Feature) it should hide the logs only for that one.
If the above two suggestions don't help - please assume that what you want is NOT supported and either contribute code, or look for another tool - thanks.

Related

Kolmogorov-Smirnov test in Grafana

When reading through the DevOps Handbook by Gene Kim, I came across this interesting tid bit of information -
Apparently there is native functionality within Grafana that allows you to perform the K-S test on different datasets. Looking through the documentation I haven't been able to find anything confirming this.
Does anyone know how to perform this test on datasets? Do I need to do it within a query as a function, or is it something simpler that I am missing?
Thanks!

Any way to filter or mask karate Authorization header in request / response? [duplicate]

This question already has an answer here:
Karate api testing - I would like to mask param values
(1 answer)
Closed 1 year ago.
I'm writing some prod/smoke tests using karate and I want to avoid logging the credentials. It would be nice to see the request/response without the Authorization header or with the credentials masked.
I've set the com.intuit.karate logging level to WARN. This hides the entire request/response from logs/reports.
Yes this is planned in the roadmap: https://github.com/intuit/karate/projects/3#card-22529225
This is non-trivial and may need some community contribution. In the meantime, you could experiment with running a brute-force regex replace on the *.log and *.json files during / after test-suite runs.

Usage of $Knowledge.Answer[2] or $Knowledge.Answer[3] in Dialogflow

While using Knowledge Base in Dialogflow, $Knowledge.Answer[1] is returning a response whereas $Knowledge.Answer[2] or $Knowledge.Answer[3] are not working. Any idea?
According to googles Dialogflow documentation.
You can see from the documentation that , Multiple responses are triggered only when you have multiple answers for the same question. And how do you give multiple responses?
Well this bugged me a lot too. But it is simple. Just give the same question twice with different answer or give a slightly different question with different answer.
Example(FAQ.txt / UTF-8):
How big is google?,Google is the universe.
How big is google?, It is the biggest in the world.
Now go to Dialogflow console and type in this question. And tada. You get two responses.
This is a sample response which I am getting for the question I asked.
So Knowledge.Answer[1] and Knowledge.Answer[2] and so on, is triggered only when there are multiple answers to that question.
Hope this helps.
There's a Bike Shop sample on Github that gives a walkthrough of how to get knowledge connectors setup for your agent via uploading a .csv file as the data source.

Define a custom slot type that is no list

I am trying to code a youtube-subscriber-amount skill for Alexa.
If you ask "Alexa, ask subscribercounter for the subscribercount of {Channel}" I want to return {Channel}s subscribercount using youtube data api v3. My Problem is that I'm not sure how to create a slot in Alexa's interaction model, allowing all "strings" (Channelnames).
There was a similar question about two years ago but, it didn't really help me, since the solution was using LITERAL, which isn't available any longer. I've also seen THIS answer, and I tried putting in only "wordOne" but I always get "undefined" if I'm logging the slotvalue in aws. Can anyone help me with creating a slot, allowing every input?

Linux Rsyslogd Configuration

I need to modify a couple of things in the configuration of rsyslogd thus this gets me to this file: /etc/rsyslogd.conf. I want to make rule, more precisely a filter condition. I want to select all mesages of facility mail with the priority at least notice, but not err and save them in a different file.
Therefore, it would go something like this:
mail.notice /var/log/myfile.log
mail.warning /var/log/myfile.log
mail.crit /var/log/myfile.log
# and so on
My question is: Is there a easier way to filter those out, than typing each one? The only documentation I found about this topic is here. I didn't really get from that doc if you can do what I am asking or not, so I thought it would be a great question for stack :D.
Also: I want to filter all messages of priority crit but not facility mail and news. Same question as above.
The way I do it there in the code example is wrong.
A very good explanatory example can fe found here.

Resources