I have a question regarding a manual Test Case in Microsoft Test Manager. Is there a way to define 'custom' parameters?
Normally, you can define whatever parameter you want, like #FirstName. This parameter will automatically be added to the list of parameters of your testcase.
But I was wondering if there is something like '#Date'.. which replaces itself in a -DateTime.Now- equivalent?
Unfortunately that is not supported out of the box. The parameter parser does not understand special parameters. So, #date will not give you DateTime.Now
You can however, convert the test to a coded UI test and overwrite the parameter value to pass DateTime.Now when #date is passed.
However, i like your suggestion and would recommend that you raise it on the user voice site here => http://visualstudio.uservoice.com/forums/121579-visual-studio
Related
I know how to call specific scenario from another feature file and pass parameters along. But is there a way I can do it while checking for condition using 'if'?
For instance:
* if (role=="SME"||role=="BA") karate.call('classpath:rough/utility.feature#checkDisabled'){element: #(elem)}
If this is the wrong implementation as what I get from the console. Please suggest me a way how can i achieve this in karate?
Thanks
When you use karate.call() put the second argument inside the round brackets. This is pure JS and "Karate-style" embedded expressions will not work.
* if (role=="SME"||role=="BA") karate.call('classpath:rough/utility.feature#checkDisabled', {element: elem})
Please take some time to read this part of the docs: https://github.com/karatelabs/karate#call-vs-read
At the Manual Judgement stage we were hoping we could enter a value, continue and pass that value onto Jenkins with "${#judgment("Manual Judgment")}". We can pass the predefined option but can't enter a new one. Is there a way of getting this to work or an alternative method?
One way to achieve this is by using pipeline parameters.
In configuration stage of the pipeline, add a parameter (say Name="jenkins") and configure the parameter's options (like default value, required or not)
Before the manual judgment step, create a Evaluate Variables stage. In the stage configuration, create a variable named "jenkins" with the value ${parameters.jenkins}
In manual judgment's options, add the variable ${jenkins}
Now, during the manual judgment stage, it would show an option with the value provided to the pipeline.
You could also join Spinnaker's slack here: https://join.spinnaker.io/
I need some help with pentaho report designer.
I've used some parameters to filter my data, but, it seems that I'm obliged to filter on these parameters to show data on my charts.
So, this is what I want, I need to make my parameters optional. It means that I want to show global views even if I don't select a parameter.
Any thoughts?
Untick the mandatory checkbox in the parameter settings dialog.
You must create a hidden parameter; Let's call it "Flag" that tests whether the parameter are set, by using this post-processing formula.
=OR(ISNA([date_from]); ISNA([date_to]))
and then in your query reference that new parameter:
Select .....
where ${Flag} = TRUE OR (date between ${date_from} and ${date_to})
I have a simple MSpec test in which I am passing a null value into a method parameter (of type string) in a Because statement. I then check that an exception is thrown in the It statement.
Because _of = () => _exception = Catch.Exception(() => foo(null));
It should_throw_an_exception = () =>_exception.ShouldBeOfType<Exception>();
I need another test when the parameter is an empty string and the assertion should stay the same. I could write another test, duplicating code.
Or, is there a neater way to do this kind of test in MSpec?
For things like these I would rather use NUnit's TestCaseAttribute to have all combinations of input parameters verified against the same code. MSpec just isn't the best tool for the job here, because it doesn't support test generators like the one mentioned above. Behaviors could help a bit, bit would only de-duplicate the Its. IMHO, there's nothing wrong with mixing test frameworks for things like the one you posted.
How can i set current date using expression builder in oracle adf?
i am using jdeveloper 11.1.1.3.0 and using Input Date(ADF faces.common.component)
The expression builder is used to build EL expressions that reference a method or a value property. Its not meant to set a value but to make it available for editing. One option would be to use a method expression to invoke an action on a manage bean that then sets the value. However, in JSF 1.2 you cannot pass arguments to an EL method and for this reason you would need a work around for setting a date. The work around is that the method expression (and thus the press of a button) invokes a method, which then creates the current date (or whatever date you want to pass in) and sets it on the component directly (though setting it on the component model works much better IMO).
Frank
Another option is to have your datasource field have a default value defined for it in the business service layer. So for example if you are using ADF BC then your field can have a default of adf.currentDate.