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 them?plz respond

 

  • 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

  • cryptton2004's avatar
    cryptton2004
    Occasional Contributor

    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

    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Thank you, Community!

       

      Roshan Does this help? Please mark the best reply as a Solution to help others in the future!