TestProject Forum
Powered by leading experts in the test automation community

Can I overwrite a parameter by another parameter

Hello TestProject Community,

So here’s my situation:
First of, I’m using the SmartRecorder, sometimes in conjunction with Code bits where I need to expand it or where there are more complex actions required (like Crawling).
I have the login credentials to a test account saved in parameters.
Now I have a test whick checks whether changing some credentials, like password, works. For this, I generate a new password that is stored in a “TemporaryPassword” parameter. I insert it into the respective fields, hit update and look for the sucess message. If this sucess message comes, I want to copy the TemporaryPassword parameter on -> Password, for future uses.

The reason I want to use two seperate parameters here is that I’d like to only copy the randomized password if it has worked, so that the other tests do not break in case this one does.

I haven’t found an action for this yet. I basically just require an empty action with both Input and Output parameter. I’d do this myself but am unsure how to specify what parameters to allow.

Hi @paul.v,

You are basically looking for an action that will get a value and create a new parameter from it?

Hey amit.yahav,

No, not really a new paremeter. Basically I am looking for an Input/Output Action that takes a Input Parameter and allows a Output Parameter.
So that I can do:
Input: TemporaryPassword
Output: Password

Or in Code it would be very simply in this case:
Password = TemporaryPassword;
or more general:
paramA = paramB;

Such an addon can be easily developed. It will basically get a value as an input parameter and assign this value to an output parameter.
The output parameter doesn’t have to be new parameter, but an existing one that will be override.

I can develop this addon and update you when it’s available :slight_smile:

1 Like

I just found it there’s the possibility of executing JavaScript as an Action! So cool!
With that its of course just return “TemporaryPassword”; with Password as its Output.

Nevertheless, your help is very much appreciated.
I only used this for a few days and already experienced the best customer service by you and your team :slight_smile:
What I just don’t really get yet is how you guys earn money :thinking:

Hi @paul.v,

I’m glad that you found a solution! We are still going to publish this addon :slight_smile:
Also, thank you very much for you feedback! We are doing our best to help our users and the automation community.

As for how we earn money, TestProject is part of Tricentis group. It’s expands Tricentis’ support for the open source community, scaling and simplifying test automation for any tester.
As a leading QA tools provider (Tosca, Flood, QASymphony) Tricentis offers TestProject for FREE :slight_smile:

Kind regards,

Hi @paul.v,

We published a new addon called: “Parameters Operations” that allows you to set values to parameters during the test execution. Let me know if it helped :slight_smile:

Kind regards,

Hey @amit.yahav Is there any document available to show how to use it in Test Project?

Hi @kriti.kaushal,

To set value to a parameter using this addon, you need to create a new step and change the type to “Action”.
Then, choose the action called: “Set value to a parameter”. This action takes one input parameter which is the value that you want to assign, and also, an output parameter which is the parameter you want to set the value to.

Let me know if you have any question regarding that :wink:

Kind regards,