Allure report collapses tests with null and JSONObject.NULL parameters - allure

If two set of parameters in #DataProvider differs only with null & JSONObject.NULL param - allure report will collapse 2 tests in 1. Can it be handled by settings somehow?

The problem is that your parameters have the same toString() value. As workaround you can create a parameter wrapper, that will name your params differently. Or you can use separate parameter for that.

Related

Impossible create Test plan using RQL Expression (Allure EE)

At Allure EE tool I would like to create Test plan using RQL Expression.
Our project has a lot of test case with different tag (i.e #regress). And I want to fill the test plan with test cases which tagged '#regress'.
I enter tags = '#regress' in Base filter field, but 'invalid query' error appears every time.
enter image description here
You have 2 problems with your query:
There is no tags attribute available. You should use tag instead.
Allure expects string literals be surrounded with double quotes.
So the following query will work as expected: tag = "#regress"
See the docs for more details: https://docs.qameta.io/allure-ee/query-language/test-cases/

Passing parameters to SSPRS Report through the URL doesn't work

I'm trying to access a SSPRS report that has the option to select the year and the month by adding the parameters in the URL as &param=value but I always get the default.
This are the parameters and I know I'm sending the correct values in the URL.
This is the report panel where I can select the Year and Month, I'm trying to get the specific report that I need by passing those parameters in the URL.
What could I be doing wrong?
Thank you everyone.
There are a couple of ways these go wrong, I'm guessing your problem is URL encoding of your date parameter, but I'll give you other stuff too. Here is a working URL with 3 parameters: a date, a string, and an integer.
https://db01.MyCompany.com/ReportServer_Prod?/Reports/R440_OutstandingRecp&paramDateEnd=12%2f31%2f2015&paramPropLiab=Property&paramRepPeriod=1
The key parts of this URL:
"https://db01.MyCompany.com/ReportServer_Prod?/" - db01.MyCompany.com is our database VM, and I'm using the "Prod" (production) instance of SQL on it.
NOTE: Check your Reporting Services Configuration application and look at the "Web Service URL" to get what "ReportServer_Prod" is on your installation.
"?/Reports/" is the path to the virtual directory, note that this is different from the path a browser would normally use. Normally my path would be "ReportServer_Prod/Pages/Report.aspx?ItemPath=%2fReports%2fR440_OutstandingRecp" if I was just viewing this from the Reporting Services interface.
Parameters are separated by "&" and it's "ParamName" "=" "ParamValue" so "&paramPropLiab=Property&paramRepPeriod=1" are the string and integer parameters respectively.
Lastly, parameter values are URL encoded if necessary. Mostly it doesn't show up, but for dates and some strings, it becomes necessary. We can't send something like "12/31/2015" because it looks like part of the path, we need a URL encoded string like "12%2f31%2f2015"
Hopefully one (or more) of these were what you needed, reply in the comments if it's still not working or if you need more explanation of why the parts are what they are.
EDIT: One more thing, if a parameter has a "Display" and a "Value" (i.e. in a drop down list) you must pass the value, not the display.
EDIT: I can't make the comment stop hiding my URL, so I'll put it here
WHAT WAS TRIED
https://slo2000/Reports_TECOVA?/Reports/TEXO%20CVA%20Reports%2fTEXO_London_B_CVA_Report&ReportMonth=January&ReportYear=2020
https://slo2000/Reports_TECOVA?/Reports/TEXO%20CVA%20Reports/TEXO_London_B_CVA_Report&ReportMonth=January&ReportYear=2020
https://slo2000/ReportServer_TECOVA?/Reports/TEXO+CVA+Reports/TEXO_London_B_CVA_Report&ReportMonth=January&ReportYear=2020
WHAT WORKS (From #Nacho in comments, brought here for visibility)
http://slo2000/ReportServer_TECOVA/Pages/ReportViewer.aspx?%2TEXO+CVA+Reports%2fTEXO_London_B_CVA_Report&rs:Command=Render&ReportMonth=January&ReportYear=2020

How to specify path to a report from another report?

I have SSRS on SQL Server 2012 and using report builder to build a drillthrough report. I have a table 6 rows and multiple columns. Each text box has some number in it and I should be able to click on these numbers and go to a different report. Both these reports would be under same folder on report server.
Problem:
I am able to do it until this point by following instructions at this page.
My problem is I can't use a static link as each text box should direct to it's own unique report. And when I "Specify a report:" using "Browse" button there or by providing static link, same link will be used for all the text boxes in the same column. What I need is to be able to specify path to the report which is of format /Folder_Name/<valueOfColumn1><valueOfColumn2><nameOfColumn3>;
What I tried:
So I tried to use "Expression" by clicking on "fx" button and provided link as =Globals!ReportFolderFields!column1.ValueFields!column2.ValueFields!column3.Name
Outcome:
When I try using above methods by using expression it doesn't throw any error but the text box is not clickable (doesn't turn pointer into an index finger). When I used static link by using "Browse" button, the same text box was clickable and was taking me to another report.
What am I missing here? Any pointer would be helpful.
The syntax of the field list in your formula needs a few changes. It looks like what you're really trying to do is concatenate several fields together, with a slash at several spots, in order to get the proper URL format.
Let's assume that the following elements resolve to the strings you need. (It can sometimes be helpful to verify these resolve to what you're expecting by inserting textboxes for each, individually, in a section of the report for troubleshooting; you can always remove them later.)
Globals!ReportFolder
Fields!column1.Value
Fields!column2.Value
Fields!column3.Name
If you would like to concatenate these together to use as a URL, together with a few slashes added in the correct places, you'll need to follow the SSRS conventions on operators in expressions, which results in something like this:
"/" & Globals!ReportFolder & "/" & Fields!column1.Value & Fields!column2.Value & Fields!column3.Name
as always, since this is an expression, it will need to start with an equals sign.
The expression builder doesn't insert operators for you between fields - it's not that smart...

Can i get the filename like #[header:originalFilename] in a component in mule3

I use
<gzip-compress-transformer/>
<base64-encoder-transformer/>
after a file connector, and then write a component to deal with the gzip+base64 content.
How can i get the file name in the component?
Note that we introduced annotations in Mule 3 for doing runtime injection, this means you can specify how to invoke a component without needing transformers i.e.
public void save(#Payload String fileContents, #InboundHeaders("originalFilename") String originalFilename)
See: http://www.mulesoft.org/documentation/display/MULE3USER/Creating+Service+Objects+and+Transformers+Using+Annotations
Does your component implement Callable? If not, do you want to keep your component Mule-unaware?
Based on your answers to these questions, different options exist:
With Callable, you get the headers in message.getProperty...
Without implementing Callable, you can access RequestContext to get the current Mule event and from there reach the message properties. But this makes your component Mule aware.
Otherwise, have your component's method take a second parameter (String originalFilename) and use a standard expression transformer to transform the payload in an array that contains: #payload, #[header:originalFilename]. This arrays will then be passed as arguments to your component's method.
[message.outboundproperties[originalFilename]]
with this expression you can get the original file name in the component.

How do you reference a field in the Embedded Code of an SSRS report

Is there a proper way to reference the fields of a ssrs report from the embedded code of an ssrs report?
When I try to use Fields!Program.Value I get the following error --
There is an error on line 3 of custom code: [BC30469]
Reference to a non-shared member requires an object reference.
Upon googling I found you could reference the Parameters of a report by prepending Report. at the beginning. So I tried this Report.Fields.Program.Value.
That results in the following error...
There is an error on line 3 of custom code: [BC30456] 'Fields' is not a member of 'Microsoft.ReportingServices.ReportProcessing.ExprHostObjectModel.IReportObjectModelProxyForCustomCode'.
So... in summary, is there a way to reference the fields from the embedded code. I figured out I could pass the field vals to the function itself but I would prefer to reference the fields directly.
Seth
You have to pass it in as a parameter.
=Code.ToUSD(Fields!StandardCost.Value)
You do have two other alternatives to passing by parameter, though neither is very pretty.
(Beware! After I wrote the following paragraph I discovered defaults from queries are not supported in local processing mode so this first solution may not be viable for you as it was not for me.)
You can create a hidden report parameter with a default value set from a dataset, then reference this with the Report.Parameters!MyParam.Value syntax. You have to be careful when testing this, as (at least in BI studio 2005) the report parameters don't seem to get reliably re-initialised from the DB in the Preview tab.
Alternatively you can create a hidden textbox on the report with its text set from a dataset, and then reference the textbox from code. In this case you have to pass the ReportItems object as a parameter, but the slight advantage is that it is only ever one extra parameter. Be sure to strongly type the parameter when declaring it:
public Sub MyCustomCode(ri as ReportItems)
The code will work in BI studio without the type declaration but for me it caused errors with the report viewer control in local processing mode if 'as ReportItems' was not present.
In either case, this is only really useful for page level data, so functions for use in a table should still take parameters.

Resources