Forum Discussion

Roshan's avatar
Roshan
New Member
4 years ago

soapui-testing and automation

Hello everyone, just got one thing to ask,In all the rest api tools like soapui or postman, can we use python to call all the parameters and test the api's automatically instead of manually testing t...
  • cryptton2004's avatar
    4 years ago

    Or you can pass those parameters to the testrunner as arguments and you'll be able to access them at the Project level.
    High level pseudo example:

     

    SOAPUI_RUNNER=${SOAPUI_HOME}/bin/testrunner.sh
    SOAPUI_COMMAND="${SOAPUI_RUNNER} "${SOAPUI_TESTS_DIR}/${TEST_SUITE}" -I -f \"${RELATIVE_REPORT_DIR}\" \
                      -PmyCustomEndpoint=httpEndpointHere \
                      -PsecondParameter=secondValue \
                      ${ANY_OTHER_PREDEFINED_SOAPUI_EXTRA_ARGS}"
      echo "Running: ${SOAPUI_COMMAND}"
      sh -c "${SOAPUI_COMMAND}"

     

    And then you'll use that as an endpoint for your http test step: ${#Project#myCustomEndpoint}/api/v2