12.05 - Build-in shortcuts (macros)

# EXECUTE_SOAPUI {soapui_script}

What: This macro loads and executes a soapui script, then verifies the success of the execution.

# EXECUTE_SOAPUI {soapui_script}

=>

LOAD {soapui_script} AS __soapui_script{%%rand1}.file

CONVERT __soapui_script{%%rand1}.file TO script.soapui(structured) AS __soapui_script{%%rand2}.soapui

EXECUTE execute WITH __soapui_script{%%rand2}.soapui AS __exec{%%rand3}.result

ASSERT __exec{%%rand3}.result IS success

Input:

    • {soapui_script}: path to a soapui xml workspace file. Will be converted to a 'soapui.script' resource

Example:

# EXECUTE_SOAPUI path/to/soapui-script.xml

# EXECUTE_SOAPUI {soapui_script} WITH TEST_SUITE {testsuites}

What: This macro loads the {soapui_script} and executes the given {testsuites}, then verifies the success of the execution.

# EXECUTE_SOAPUI {soapui_script} WITH TEST_SUITE {testsuites} AND TEST_CASE {testcases}

=>

LOAD {soapui_script} AS __soapui_script{%%rand1}.file

CONVERT __soapui_script{%%rand1}.file TO script.soapui(structured) AS __soapui_script{%%rand2}.soapui

EXECUTE execute WITH __soapui_script{%%rand2}.soapui USING $(soapui.test.suites:{testsuites};soapui.test.cases:{testcases}) AS __exec{%%rand5}.result

ASSERT __exec{%%rand5}.result IS success

Input:

    • {soapui_script}: path to a sopaui xml workspace file. Will be converted to a 'soapui.script' resource

    • {testsuites}: name of the tests suite of the soapui workspace to execute. It could be one test suite or a list of comma separated tests suite to execute

Example:

# EXECUTE_SOAPUI path/to/soapui-script.xml WITH TEST_SUITE testsuite_name

# EXECUTE_SOAPUI {soapui_script} WITH TEST_SUITE {testsuites} AND TEST_CASE {testcases}

What: This macro loads a soapui xml workspace and executes the given test case(s), then the macroverify the success of the execution.

# EXECUTE_SOAPUI {soapui_script} WITH TEST_SUITE {testsuites} AND TEST_CASE {testcases}

=>

LOAD {soapui_script} AS __soapui_script{%%rand1}.file

CONVERT __soapui_script{%%rand1}.file TO script.soapui(structured) AS __soapui_script{%%rand2}.soapui

EXECUTE execute WITH __soapui_script{%%rand2}.soapui USING $(soapui.test.suites:{testsuites};soapui.test.cases:{testcases}) AS __exec{%%rand5}.result

ASSERT __exec{%%rand5}.result IS success

Input:

    • {soapui_script}: path to a sopaui xml workspace file. Will be converted to a 'soapui.script' resource

    • {testsuites}: name of the tests suite of the soapui workspace to execute. It could be one test suite or a list of comma separated tests suite to execute

    • {testcases}: name of the tests case to execute in the tests suite. It could be only one test case or a comma separated list of tests case

Example:

# EXECUTE_SOAPUI path/to/soapui-script.xml WITH TEST_SUITE issueServiceTest AND TEST_CASE retrieveIssue,issueExists

# EXECUTE_SOAPUI_BUNDLE {soapui_bundle} WITH PROJECT {projectpath}

What: This macro executes a soapui script embedded in a bundle, then the macro verifies the success of the execution.

# EXECUTE_SOAPUI_BUNDLE {soapui_script}

=>

LOAD {soapui_bundle} AS __soapui_bundle{%%rand1}.file

CONVERT __soapui_bundle{%%rand1}.file TO script.soapui(structured) AS __soapui_bundle{%%rand2}.soapui

EXECUTE execute WITH __soapui_bundle{%%rand2}.soapui USING $(soapui.project.path:{projectpath}) AS __exec{%%rand3}.result

ASSERT __exec{%%rand3}.result IS success

Input:

    • {soapui_bundle}: path to the soapui bundle to load.

    • {projectpath}: path to the soapui xml workspace file (relative to the root of the bundle)

Example:

# EXECUTE_SOAPUI_BUNDLE soapui WITH PROJECT soapui-integration-tests.xml

# EXECUTE_SOAPUI_BUNDLE {soapui_bundle} WITH PROJECT {projectpath} AND TEST_SUITE {testsuites}

What: This macro executes the given tests suite of the loaded sopaui bundle, then the macro verifies the success of the execution.

# EXECUTE_SOAPUI_BUNDLE {soapui_bundle} WITH PROJECT {projectpath} AND TEST_SUITE {testsuites}

=>

LOAD {soapui_bundle} AS __soapui_bundle{%%rand1}.file

CONVERT __soapui_bundle{%%rand1}.file TO script.soapui(structured) AS __soapui_bundle{%%rand2}.soapui

EXECUTE execute WITH __soapui_bundle{%%rand2}.soapui USING $(soapui.project.path:{projectpath};soapui.test.suites:{testsuites}) AS __exec{%%rand5}.result

ASSERT __exec{%%rand5}.result IS success

Input:

    • {soapui_bundle}: path to the sopaui bundle to load

    • {projectpath} path to the soapui xml workspace file (relative to the root of the bundle)

    • {testsuites}: name of the tests suite of the soapui workspace to execute. It could be one tests suite or a list of comma separated tests suite to execute

Example:

# EXECUTE_SOAPUI_BUNDLE soapui WITH PROJECT soapui-integration-tests.xml AND TEST_SUITE issueServiceTest

# EXECUTE_SOAPUI_BUNDLE {soapui_bundle} WITH PROJECT {projectpath} AND TEST_SUITE {testsuites} AND TEST_CASE {testcases}

What: This macro loads a sopaui bundle and executes the given test case, then the macro verifies the success of the execution.

# EXECUTE_SOAPUI_BUNDLE {soapui_bundle} WITH PROJECT {projectpath} AND TEST_SUITE {testsuites} AND TEST_CASE {testcases}

=>

LOAD {soapui_bundle} AS __soapui_bundle{%%rand1}.file

CONVERT __soapui_bundle{%%rand1}.file TO script.soapui(structured) AS __soapui_bundle{%%rand2}.soapui

EXECUTE execute WITH __soapui_bundle{%%rand2}.soapui USING $(soapui.project.path:{projectpath};soapui.test.suites:{testsuites};soapui.test.cases:{testcases}) AS __exec{%%rand5}.result

ASSERT __exec{%%rand5}.result IS success

Input:

    • {soapui_bundle}: path to the sopaui bundle to load

    • {projectpath} path to the soapui xml workspace file (relative to the root of the bundle)

    • {testsuites}: name of the tests suite of the soapui workspace to execute. It could be one test suite or a list of comma separated tests suite to execute

    • {testcases}: name of the tests case to execute in the suite. It could be only one test case or a comma separated list of tests case

Example:

# EXECUTE_SOAPUI_BUNDLE soapui WITH PROJECT soapui-integration-tests.xml AND TEST_SUITE issueServiceTest AND TEST_CASE retrieveIssue,issueExists