Forum Discussion

steve4king's avatar
steve4king
Occasional Contributor
15 years ago

Parameters with a default value return "undefined"

Running version 8.0.290.7 on Windows XP 32bit



I've created several interdependent keyword tests.

For example.  I have one to test the time-clock in our application. 

My timeclocktest is very simple and just has two parameters: the login username and password that I want to test. It logs in -> clocks in -> logs out, then logs in -> clocks out -> logs out.  All using the parameter defaults I assign prior to running the test.



However, about 30% of the time.. the parameters have been ignoring their defaults.



Example:  I launch timeclocktest with default parameters of User: "Steve" and Pass: "pword"

The test first checks to see whether that user exists, and if not, it creates it with full permissions.



30% of the time however, it's checking to see whether user "" exists, then tries creating a new user with user: "" and password: "".



When I originally created these tests, this did not happen.  I just had to change the highest level parameter and every associated test utilized that.

I don't know what has changed, but any help would be appreciated.



Thanks,

-Stephen


2 Replies


  • Hi Stephen,





    First of all, please upgrade to the latest version of the tool, which is 8.10.487, and check whether the problem occurs with it. If the problem remains in the latest version, please reproduce it to generate logs of the failed execution, pack the entire project suite folder and send us the archive via the Contact Support form.
  • steve4king's avatar
    steve4king
    Occasional Contributor
    Thanks David.

    Paul replied to a support request this morning about this and was able to replicate.  I'll post his note below so that others can benefit:



    Hello Stephen,



    I have reproduced the problem. When running a test with an optional parameter with a specified default value, the test run results will be different depending on the way you are running the test:

      - when running the test from within the Project Explorer, the test is run with an undefined parameter value;

      - when running the test from within the Keyword Test editor, from script or as a test item, the test is run with the specified default value.



    I have registered this issue in our database. Currently, to avoid the problem, do not run keyword tests from within the Project Explorer. You can find possible ways to run a keyword test in the "Running Keyword Tests" ( http://www.automatedqa.com/support/viewarticle/12564/ ) help topic.



    Best regards,

    Paul