Injecting a Authorization Token to the request automatically

needhelpneedhelp Posts: 11

Hi,
here is the situation. previously I have create my test scripts and did not have need the authorization token. The project has been moving on and has introduced the "Security Authorization Token". Now, I have this challenge to open each single test and add this parameter and token in the Header.

I wonder, if SOATest has the ability to inject the Authorization token automatically like certifcate setting.

Comments

  • benken_parasoftbenken_parasoft Posts: 462 ✭✭✭
    edited September 2017

    open each single test and add this parameter and token in the Header

    I assume you are referring to an HTTP header. Yes, I believe this is indeed what you have to do. There's no bulk/batch edit option for this. You have to open each test then add the header.

    As a possible alternative, SOAtest does provide a REST API which can be used to query and update test cases. However, using this would require you to write a custom script or tst to make a bunch of REST API calls to perform the search and make updates. You'll have to decide which approach is quicker or simpler for you.

  • needhelpneedhelp Posts: 11

    I will go with a script, which I believe will require to add to tst an extension tool that will perform the add of header for all tests in the suite.

  • benken_parasoftbenken_parasoft Posts: 462 ✭✭✭

    I will go with a script, which I believe will require to add to tst an extension tool that will perform the add of header for all tests in the suite.

    In case there is misunderstanding I want to clarify "write a custom script or tst to make a bunch of REST API calls". This means you should use your preferred method of making REST API calls (whatever that may be for you). If you decide to do write code then by all means use your preferred language and execution environment or interpreter (nothing is requiring a SOAtest extension tool here). However, I also mentioned "or tst" because you can easily use SOAtest REST Client tools to make REST API calls (to SOAtest itself in this case).

Sign In or Register to comment.