github.com/kubeshop/testkube@v1.17.23/contrib/executor/soapui/README.md (about) 1  2 3 # Welcome to Testkube SoapUI Executor 4 5 Testkube SoapUI Executor is a test executor module for [Testkube](https://testkube.io). 6 7 # Details 8 9 ## Importing the SoapUI Executor into your Testkube cluster 10 11 In order to be able to run tests with this executor, it first needs to be imported as a Custom Resource into your Kubernetes cluster. 12 This can be achieved by cloning the repository and running: 13 14 ```bash 15 $ kubectl testkube create executor --image kubeshop/testkube-executor-soapui:latest --types "soapui/xml" --name soapui-executor 16 17 ████████ ███████ ███████ ████████ ██ ██ ██ ██ ██████ ███████ 18 ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 19 ██ █████ ███████ ██ █████ ██ ██ ██████ █████ 20 ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 21 ██ ███████ ███████ ██ ██ ██ ██████ ██████ ███████ 22 /tɛst kjub/ by Kubeshop 23 24 25 Executor created soapui-executor 🥇 26 ``` 27 28 ## Running a SoapUI test 29 30 In order to run a SoapUI test using Testkube, it is necessary to create a Testkube Test. 31 32 ### Using files as input 33 34 Testkube and the SoapUI executor accepts a project file as input. 35 36 ```bash 37 $ kubectl testkube create test --file REST-Project-1-soapui-project.xml --type soapui/xml --name example-test 38 39 ████████ ███████ ███████ ████████ ██ ██ ██ ██ ██████ ███████ 40 ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 41 ██ █████ ███████ ██ █████ ██ ██ ██████ █████ 42 ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 43 ██ ███████ ███████ ██ ██ ██ ██████ ██████ ███████ 44 /tɛst kjub/ by Kubeshop 45 46 47 Test created / example-test 🥇 48 49 ``` 50 51 ### Using strings as input 52 53 ```bash 54 $ cat REST-Project-1-soapui-project.xml | kubectl testkube create test --type soapui/xml --name example-test-string 55 56 ████████ ███████ ███████ ████████ ██ ██ ██ ██ ██████ ███████ 57 ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 58 ██ █████ ███████ ██ █████ ██ ██ ██████ █████ 59 ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 60 ██ ███████ ███████ ██ ██ ██ ██████ ██████ ███████ 61 /tɛst kjub/ by Kubeshop 62 63 64 Test created / example-test-string 🥇 65 66 ``` 67 68 ## Running the tests 69 70 To run the created test, use: 71 72 ```bash 73 $ kubectl testkube run test example-test 74 75 ████████ ███████ ███████ ████████ ██ ██ ██ ██ ██████ ███████ 76 ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 77 ██ █████ ███████ ██ █████ ██ ██ ██████ █████ 78 ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 79 ██ ███████ ███████ ██ ██ ██ ██████ ██████ ███████ 80 /tɛst kjub/ by Kubeshop 81 82 83 Type : soapui/xml 84 Name : example-test 85 Execution ID : 624eedd443ed8485ae9289e2 86 Execution name: illegally-credible-mouse 87 88 89 90 Test execution started 91 92 Watch test execution until complete: 93 $ kubectl testkube watch execution 624eedd443ed8485ae9289e2 94 95 96 Use following command to get test execution details: 97 $ kubectl testkube get execution 624eedd443ed8485ae9289e2 98 99 ``` 100 101 ### Using params and args in your tests 102 103 SoapUI lets you configure your test runs using different parameters. To see all available command line arguments, check the [official SoapUI docs](https://www.soapui.org/docs/test-automation/running-functional-tests/). 104 105 When working with Testkube, the way to use the parameters is by using the `kubectl testkube start` command with the `--args` parameter. 106 An example would be: 107 108 ```bash 109 $ kubectl testkube start test -f example-test --args '-I -c "TestCase 1"' 110 111 ████████ ███████ ███████ ████████ ██ ██ ██ ██ ██████ ███████ 112 ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 113 ██ █████ ███████ ██ █████ ██ ██ ██████ █████ 114 ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ 115 ██ ███████ ███████ ██ ██ ██ ██████ ██████ ███████ 116 /tɛst kjub/ by Kubeshop 117 118 119 Type : soapui/xml 120 Name : successful-test 121 Execution ID : 625404e5a4cc6d2861193c60 122 Execution name: currently-amused-pug 123 124 125 Getting pod logs 126 Execution completed ================================ 127 = 128 = SOAPUI_HOME = /usr/local/SmartBear/SoapUI-5.7.0 129 = 130 ================================ 131 SoapUI 5.7.0 TestCase Runner 132 10:37:37,713 INFO [DefaultSoapUICore] Creating new settings at [/root/soapui-settings.xml] 133 10:37:43,567 INFO [PluginManager] 0 plugins loaded in 36 ms 134 10:37:43,570 INFO [DefaultSoapUICore] All plugins loaded 135 10:37:50,774 INFO [WsdlProject] Loaded project from [file:/tmp/test-content359342991] 136 10:37:50,834 INFO [SoapUITestCaseRunner] Running SoapUI tests in project [REST Project 2] 137 10:37:50,838 INFO [SoapUITestCaseRunner] Running TestCase [TestCase 1] 138 10:37:50,876 INFO [SoapUITestCaseRunner] Running SoapUI testcase [TestCase 1] 139 10:37:50,901 INFO [SoapUITestCaseRunner] running step [1 - Request 1] 140 10:37:54,180 INFO [SoapUITestCaseRunner] Assertion [Valid HTTP Status Codes] has status VALID 141 10:37:54,193 INFO [SoapUITestCaseRunner] Assertion [Contains] has status VALID 142 10:37:54,257 INFO [SoapUITestCaseRunner] Finished running SoapUI testcase [TestCase 1], time taken: 990ms, status: FINISHED 143 10:37:54,315 INFO [SoapUITestCaseRunner] TestCase [TestCase 1] finished with status [FINISHED] in 990ms 144 145 146 . 147 Use following command to get test execution details: 148 $ kubectl testkube get execution 625404e5a4cc6d2861193c60 149 ``` 150 151 Usage of the `-I` argument is highly suggested to get cleaner results. 152 153 ## Reports, plugins and extensions 154 155 In order to be able to use reports, add plugins and extensions the way [SoapUI docs](https://www.soapui.org/docs/test-automation/running-in-docker/) describe it, is currently not supported by Testkube. 156 In case you need this feature, please create an issue in the Testkube repository as described below. 157 158 # API 159 160 Testkube Executor SoapUI implements [testkube OpenAPI for executors](https://docs.testkube.io/openapi#tag/executor) (look at executor tag) 161 162 # Issues and enchancements 163 164 Please follow the main [Testkube repository](https://github.com/kubeshop/testkube) for reporting any [issues](https://github.com/kubeshop/testkube/issues) or [discussions](https://github.com/kubeshop/testkube/discussions)