Forum Discussion

snigam's avatar
snigam
Occasional Contributor
12 months ago
Solved

ReadyAPI-TestComplete Integration - Having issue with passing values to TC project variables

I am executing a TestComplete test case from the ReadyAPI and I need to pass values to three TC project variables. I have tried these two options but they are not working. Please help -

 

Option 1: I am storing the variable values in an Excel spreadsheet while executing the ReadyAPI test case, TestComplete test case creates a copy of that Excel and reads the value of the copied Excel spreadsheet. The issue is when I run the TC test case by itself then it executes fine and works as expected, but when I run the ReadAPI test case (ReadyAPI executes the TestComplete test case) the TC test case fails with an error - 

"Unable to evaluate the operation's "NewValue" parameter. Error: The needed data source driver is not installed or is not configured properly.
To read data, install the 32-bit version of Microsoft Office 12.0 Access Database Engine OLE DB Provider. It is part of Microsoft Access Database Engine 2010 Redistributable. You can find it on the Microsoft website"
 
Option 2: (Use Command-Line) - In ReadyAPI -TestComplete editor in 'Other args' field, I am passing variable value as "/pv:{varaiable name}={varaiable value}"
When I execute the ReadyAPI test case, it launches the TC and gives me the error - "A command-line variable cannot have the "{variable name}" name."
  • If anyone runs into a similar issue then I would like to share it here-

    1. Figured out the error I was getting with option 2. I had the space after the equal sign '=' in my command line and that was throwing the error when TC was getting launched. I am successfully able to pass the project variable value to the TC project after removing the space (there should be no space in the argument). However, through CommandLine we can pass value only to one project variable and have no ability to dynamically pass the variable value in ReadyAPI -TC editor. Therefore it was a go for me.

     

    I found option 3 - Use CSV file instead of Excel to transfer the project properties and it is working as expected, no drivers issue.

4 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    The needed data source driver is not installed or is not configured properly.

    This means that Excel ODBC/OLE DB driver is not installed for the bitness of TestComplete that is launched by ReadyAPI but is installed for the bitness of TestComplete you are using manually.

    For example, you may manually use 64-bit flavor of TestComplete from <TestComplete>\x64\Bin\ folder, but ReadyAPI may start 32-bit flavor of TestComplete from <TestComplete>\Bin\ folder.

     

  • snigam's avatar
    snigam
    Occasional Contributor

    If anyone runs into a similar issue then I would like to share it here-

    1. Figured out the error I was getting with option 2. I had the space after the equal sign '=' in my command line and that was throwing the error when TC was getting launched. I am successfully able to pass the project variable value to the TC project after removing the space (there should be no space in the argument). However, through CommandLine we can pass value only to one project variable and have no ability to dynamically pass the variable value in ReadyAPI -TC editor. Therefore it was a go for me.

     

    I found option 3 - Use CSV file instead of Excel to transfer the project properties and it is working as expected, no drivers issue.

    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      through CommandLine we can pass value only to one project variable 

      Oh, really? I was sure that it is possible to pass as many variables as required by specifying several /pv: parameters...

       

      Nevertheless, it is good to hear that the problem has been solved.

       

       

      • snigam's avatar
        snigam
        Occasional Contributor

        I tried that too,  I tried all possible combinations for example - "/pv:{varaiable1 name}={variable1 value}, /pv:{variable2 name}={variable2 value}..."  OR "/pv:{variable1 name}={variable1 value}, {variable2 name}={variable2 value}..." OR "pv:{variable name}={variable value}; {variable name}={variable value}.." 

        and for each, it maps the entire string to the first variable, varaible1 value = {variable1 value}, /pv:{variable2 name}={variable2 value}... 

        P.S. It is a possibility that I am missing something.. Please share if anyone knows.