Forum Discussion

cauvery's avatar
cauvery
Contributor
9 years ago

Jenkins job fails to recognize Ready API global properties.

Ready API executed on Jenkins fails for not getting the values for Ready API global properties.

I am getting exception as below:

ERROR [AbstractTestRunner] Exception during Test Execution
com.twilio.exception.ApiException: The requested resource /Accounts//IncomingPhoneNumbers was not found

 

I can see the value is null as in the url in the above is not populated (empty /Accounts//IncomingPhoneNumbers). If I move the global properties to project properties then the jenkins job is working fine.

 

I am using the following in my test case setup script to get the global properties:

 

String var = context.expand( '${globalProp}' )

 

when I moved this globalProp to project properties I changed to

String var = context.expand( '${#Project#prop}' )

 

then I don't have any issues with jenkins job. But I want these to be global level properties in my project and not project properties.

 

Please any suggestions as to why jenkins job is not getting global properties values.

 

Thank you,

Cauvery.

  • Got a better alternate. Makes sense that the global properties will be not recognized. So used groovy file outside of Ready API  tool and worked like a charm.

  • Got a better alternate. Makes sense that the global properties will be not recognized. So used groovy file outside of Ready API  tool and worked like a charm.

    • Sbu's avatar
      Sbu
      Occasional Contributor

      Expansion also works on global properties with ${#Global#nameOfGlobalProp}.

       

      Did you try that ?