cancel
Showing results for 
Search instead for 
Did you mean: 

soapui-testing and automation

SOLVED
Roshan
New Member

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
cryptton2004
Occasional Contributor

Re: soapui-testing and automation

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

View solution in original post

3 REPLIES 3
AlexKaras
Community Hero

Re: soapui-testing and automation

Hi,

 

As per https://support.smartbear.com/readyapi/docs/testing/scripts/index.html, Groovy and Rhino JavaScript are supported as scripting languages.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
cryptton2004
Occasional Contributor

Re: soapui-testing and automation

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

View solution in original post

sonya_m
Community Manager

Re: soapui-testing and automation

Thank you, Community!

 

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


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Top Kudoed Authors