{"id":81997,"date":"2019-05-31T12:01:45","date_gmt":"2019-05-31T12:01:45","guid":{"rendered":"https:\/\/www.softwaretestinghelp.com\/?page_id=81997"},"modified":"2025-12-08T03:56:16","modified_gmt":"2025-12-08T03:56:16","slug":"parameterized-testing-spock","status":"publish","type":"page","link":"https:\/\/www.softwaretestinghelp.com\/parameterized-testing-spock\/","title":{"rendered":"Data-driven or Parameterized Testing With Spock Framework"},"content":{"rendered":"<p><strong>Explore the Ways of Writing Data-driven or Parameterized Tests with the Spock Framework:<\/strong><\/p>\n<p>In this <a href=\"https:\/\/www.softwaretestinghelp.com\/spock-and-groovy\/\"><strong>Free Spock Training Tutorial Series<\/strong><\/a>, we explored all about <a href=\"https:\/\/www.softwaretestinghelp.com\/unit-testing-with-spock\/\"><strong>Unit Testing in Spock<\/strong><\/a> and Test fixtures, Assertions and Reporting in our previous tutorial.<\/p>\n<p>In this tutorial, we will try to understand what parameterized tests are and how you can leverage the in-built features of Spock to achieve data-driven testing.<\/p>\n<p><em><strong>Let&#8217;s start!!<\/strong><\/em><br \/>\n<em><strong> <\/strong><\/em><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/PARAMETERIZED-TESTING.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-82035\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/PARAMETERIZED-TESTING.png\" alt=\"PARAMETERIZED TESTING\" width=\"650\" height=\"366\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/PARAMETERIZED-TESTING.png 650w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/PARAMETERIZED-TESTING-300x169.png 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><\/p>\n<p><span style=\"color: #ff6600;\"><strong>Watch the Video Tutorial<\/strong><\/span><\/p>\n<p><iframe src=\"https:\/\/www.youtube.com\/embed\/AqTrFjnYebc\" width=\"650\" height=\"350\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">?<\/span><\/iframe><\/p>\n<h3>What are Parameterized Tests?<\/h3>\n<p>For anyone who has worked with automation\/unit tests, data-driven testing is not a new term.<\/p>\n<p>Parameterized tests are nothing but they are any kind of tests that share the same execution logic and differ only in the input data and outcome in some cases.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Example:<\/strong><\/span> Suppose you have a Calculator application, in order to test the functionality completely you might want to run your tests against different input set.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Example:<\/strong><\/span> Negative values, fractional numbers, normal integers, integers nearing max allowed range, etc. No matter what input values you have, you want to run the same execution logic.<\/p>\n<p>Another good reason to write parameterized tests is that it does not just test a happy path, rather it also tests error path or negative scenarios.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Example:<\/strong><\/span> Suppose there is an application that returns whether a given file extension is valid or not. Data-driven tests can quickly enable the developer to execute tests for supported file extensions and any error scenarios or negative input tests.<\/p>\n<p>Now traditionally, you can think of writing or copying over the tests for multiple input values but, that\u2019s not the correct or smart way to achieve this kind of test execution. Moreover, as the number of tests starts increasing in your app, these tests will become difficult to maintain.<\/p>\n<h3>Writing Parameterized Tests with Spock<\/h3>\n<h4><span style=\"color: #ff6600;\">The where: block<\/span><\/h4>\n<p>The where block in a Spock test, is the block that holds data for the parameterized test. It can optionally contain both input and expected output values. An important point to note about this block is that this should be the last block in a Spock test.<\/p>\n<p>Having said that, it can be combined with all the other blocks like given, when &amp; then but should be the last block.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Let\u2019s look at an Example to understand it better<\/strong><\/span><\/p>\n<p>We will be using a calculator application that takes 2 input parameters and returns the sum of the supplied inputs. We will be writing a parameterized test supplying multiple inputs and expectedOutput values.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\ndef &amp;amp;quot;sample parameterized test&amp;amp;quot;() {   \r\ngiven:  \r\n        def app = new CalculatorApp()    \r\nwhen:  \r\n        def resultSum = app.add(input1, input2)     \r\nthen:  \r\n    resultSum == expectedResult      \r\nwhere:  \r\n    input1 |input2  |expectedResult  \r\n    10     |15      |25  \r\n    -4     |6       |2  \r\n}  \r\n<\/pre>\n<p><strong>In the above code sample you can see the following:<\/strong><\/p>\n<ol>\n<li>\u201cwhere\u201d block which contains the data for the test to run.<\/li>\n<li>\u201cwhere\u201d block is the last block of the test.<\/li>\n<li>\u201cwhere\u201d is combined with the other blocks i.e. given, when and then.<\/li>\n<li>Data representation is a special format called data tables which we will look in detail in the upcoming sections of this tutorial.<\/li>\n<li>Header row of data is essentially the properties\/input variables which can be directly used in the test. <span style=\"text-decoration: underline;\"><strong>E.g.<\/strong><\/span> Refer to the statement in the \u201cwhen\u201d block where we\u2019ve directly used <strong>input1<\/strong> and <strong>input2<\/strong> as input parameters without defining them explicitly.<\/li>\n<\/ol>\n<h4><span style=\"color: #ff6600;\">Using Datatables<\/span><\/h4>\n<p>Let\u2019s try understanding data tables in detail now. Each line of the data-table represent data for an individual scenario (test execution).<\/p>\n<p>By convention i.e. input values are preceded by a single pipe (\u2018|\u2019) while output values are preceded by double pipe (\u2018||\u2019). This does not have any logical significance, but it\u2019s convention &amp; it improves readability. Thus, both the examples below hold true.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\ninput1 |input2\u00a0\u00a0|expectedResult\u00a0 \r\n10\u00a0\u00a0\u00a0\u00a0\u00a0|15\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|25\u00a0 \r\n-4\u00a0\u00a0\u00a0\u00a0\u00a0|6\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|2\u00a0\u00a0\u00a0  \u00a0 \r\ninput1 |input2\u00a0\u00a0|| expectedResult\u00a0 \r\n10\u00a0\u00a0\u00a0\u00a0\u00a0|15\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|| 25\u00a0 \r\n-4\u00a0\u00a0\u00a0\u00a0\u00a0|6\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0|| 2\r\n<\/pre>\n<p>The header row, as shown above, has a name for each of the parameters supplied as data to test. It\u2019s important to note here that these parameter names should not clash with any existing local\/global variables in the test, else there will be <strong>compile-time errors<\/strong> to resolve variable names.<\/p>\n<p>An important point to note while using data-tables is that a minimum of 2 columns is required. If you just have a need of one column, then a blank column with values as underscore character is a workaround like below.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\ninput1 ||_\r\n10        ||_\r\n-4        ||_ \r\n<\/pre>\n<p>The advantage of this format is simplicity, readability, and extensibility. Adding a new data input is as simple as adding a new row with data values.<\/p>\n<p>Another point to note here is that data tables can be used to hold any type of variables, classes, objects, enums, etc. which make it even more powerful. As groovy is an optionally typed language, if an explicit type is not specified, the variables in the data table imply depending on the type of data supplied.<\/p>\n<p>Let\u2019s see another <span style=\"text-decoration: underline;\"><strong>Example<\/strong><\/span> using data tables with a list of strings as input and output as a count of elements in the string.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\ndef &amp;amp;quot;sample parameterized test with list data type&amp;amp;quot;() {  \r\n    when:  \r\n    def actualCount = input1.size()     \r\nthen:  \r\n    actualCount == expectedCount    \r\nwhere:  \r\n    input1                                      ||expectedCount  \r\n    &#x5B;&amp;amp;quot;hello&amp;amp;quot;,&amp;amp;quot;world&amp;amp;quot;,&amp;amp;quot;happy&amp;amp;quot;,&amp;amp;quot;programming&amp;amp;quot;]     ||4  \r\n    &#x5B;&amp;amp;quot;spock&amp;amp;quot;,&amp;amp;quot;data-driven&amp;amp;quot;,&amp;amp;quot;testing&amp;amp;quot;]           ||3  \r\n}  \r\n<\/pre>\n<p>In the above example, you can notice that we\u2019ve provided input as an array list of Strings and output is the size of this array list. Thus, it gives a lot of flexibility to have input data of different types.<\/p>\n<p>You can also simply mention any expressions that return data of the respective input type and use in data tables directly as well.<\/p>\n<h3>Lifecycle of the \u201cwhere\u201d Block<\/h3>\n<p>For tests containing where block and data samples in the form of data tables, each row of data represent one execution of the test method.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>For Example,<\/strong><\/span> if there are 5 rows of data and the test contains \u201cgiven\u201d and \u201cwhen\u201d blocks, then for such data-row the test blocks will get executed once. So, overall, there will be a total of 5 executions of the test method.<\/p>\n<h3>Tips &amp; Tricks<\/h3>\n<p><strong>Let\u2019s see some tips and tricks for parameterized-tests while working with these data-tables.<\/strong><\/p>\n<p>#1) Displaying the results of individual row execution separately. As we saw in the lifecycle section, for each row of data there is one execution of the test code. In order to get these rows or results displayed separately for each such row \u201c@Unroll\u201d annotation can be used for such tests.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Let\u2019s try understanding this with an example:<\/strong> <\/span><\/p>\n<p>We will be using the same calculator application with 3 sets of input data being supplied to the method under test.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\ndef &amp;amp;quot;sample parameterized test&amp;amp;quot;() {  \r\n    given:  \r\n        def app = new CalculatorApp()     \r\nwhen:  \r\n        def resultSum = app.add(input1, input1)   \r\nthen:  \r\n    resultSum == 2 * input1    \r\nwhere:  \r\n    input1 |input2  |expectedResult  \r\n    10     |15      |25  \r\n    -4     |6       |2  \r\n    -32    |12      |-20  \r\n}  \r\n <\/pre>\n<p>Without \u201c@Unroll\u201d annotation, let\u2019s see how does the result look in the terminal (as well as the html based reports). With this kind of output, it becomes difficult to find out what set of input caused the test to fail.<\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/WithoutUnroll.png\"><img decoding=\"async\" class=\"alignnone wp-image-82024 size-full\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/WithoutUnroll.png\" alt=\"Without Unroll - Parameterized Test\" width=\"652\" height=\"299\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/WithoutUnroll.png 652w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/WithoutUnroll-300x138.png 300w\" sizes=\"(max-width: 652px) 100vw, 652px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/HTMLReport-WithoutUnroll.png\"><img decoding=\"async\" class=\"alignnone wp-image-82025 size-full\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/HTMLReport-WithoutUnroll.png\" alt=\"HTMLReport - WithoutUnroll\" width=\"740\" height=\"196\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/HTMLReport-WithoutUnroll.png 740w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/HTMLReport-WithoutUnroll-300x79.png 300w\" sizes=\"(max-width: 740px) 100vw, 740px\" \/><\/a><\/p>\n<p>Now let\u2019s see how the test output is reported separately for each row after adding \u201c@Unroll\u201d annotation to the test method (which has data-tables as data input).<\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/WithUnrollAnnotation.png\"><img decoding=\"async\" class=\"alignnone wp-image-82026 size-full\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/WithUnrollAnnotation.png\" alt=\"With Unroll Annotation\" width=\"706\" height=\"376\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/WithUnrollAnnotation.png 706w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/WithUnrollAnnotation-300x160.png 300w\" sizes=\"(max-width: 706px) 100vw, 706px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/HTMLReport-WithUnroll.png\"><img decoding=\"async\" class=\"alignnone wp-image-82029 size-full\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/HTMLReport-WithUnroll.png\" alt=\"HTML Report - With Unroll\" width=\"740\" height=\"232\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/HTMLReport-WithUnroll.png 740w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/HTMLReport-WithUnroll-300x94.png 300w\" sizes=\"(max-width: 740px) 100vw, 740px\" \/><\/a><\/p>\n<p><strong>#2)<\/strong> Now, let us understand how to add meaningful info to these data-driven tests (instead of some auto appended indexes as in the screenshot above).<\/p>\n<p>We can use placeholders for the input and output properties (as per data-table) and then we can see the values populated in tests names with data from data-tables.<\/p>\n<p><strong>Let\u2019s use the same example and update the test name to get data from the input and expected output as mentioned in the data tables:<\/strong><\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n@Unroll  \r\ndef &amp;amp;quot;result of adding #input1 &amp;amp;amp; #input2 should be #expectedResult&amp;amp;quot;() {  \r\n    given:  \r\n        def app = new CalculatorApp()  \r\nwhen:  \r\n        def resultSum = app.add(input1, input1)  \r\nthen:  \r\n    resultSum == 2 * input1  \r\nwhere:  \r\n    input1 |input2  ||expectedResult  \r\n    10     |15      ||25  \r\n    -4     |6       ||2  \r\n    -32    |12      ||-20  \r\n}  \r\n <\/pre>\n<p><strong>Now let\u2019s see how does the output look in the terminal and the HTML based reports:<\/strong><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/TerminalReportWithName.png\"><img decoding=\"async\" class=\"alignnone wp-image-82027 size-full\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/TerminalReportWithName.png\" alt=\"Terminal Report With Name#\" width=\"740\" height=\"231\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/TerminalReportWithName.png 740w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/TerminalReportWithName-300x94.png 300w\" sizes=\"(max-width: 740px) 100vw, 740px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/HTMLReportWithName.png\"><img decoding=\"async\" class=\"alignnone wp-image-82028 size-full\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/HTMLReportWithName.png\" alt=\"HTML Report With Name#\" width=\"740\" height=\"232\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/HTMLReportWithName.png 740w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/HTMLReportWithName-300x94.png 300w\" sizes=\"(max-width: 740px) 100vw, 740px\" \/><\/a><\/p>\n<p>So, as you can see here the data from input and output is now showing along with the test names when they are getting executed. This way it makes troubleshooting and debugging a lot easier as it clearly indicates what input caused the test to fail or misbehave.<\/p>\n<h3>Conclusion<\/h3>\n<p>In this tutorial, we learned about writing parameterized tests with the Spock framework. We also discussed various features of data tables and how they can be used.<\/p>\n<p><em><strong>Check out our upcoming tutorial to know how to use Mocks and Stubs with Spock!!<\/strong><\/em><\/p>\n<p><strong><a href=\"https:\/\/www.softwaretestinghelp.com\/unit-testing-with-spock\/\">PREV Tutorial<\/a> | <a href=\"https:\/\/www.softwaretestinghelp.com\/spock-mocking-and-stubbing\/\">NEXT Tutorial<\/a><\/strong><\/p>\n\r\n\t\t\t<div id=\"daexthefup-container\"\r\n\t\t\t\tclass=\"daexthefup-container daexthefup-layout-stacked daexthefup-alignment-center\"\r\n\t\t\t\tdata-post-id=\"81997\">\r\n\r\n\t\t\t\t<div class=\"daexthefup-feedback\">\r\n\t\t\t\t\t<div class=\"daexthefup-text\">\r\n\t\t\t\t\t\t<h3 class=\"daexthefup-title\">Was this helpful?<\/h3>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div class=\"daexthefup-buttons-container\">\r\n\t\t\t\t\t\t<div class=\"daexthefup-buttons\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t<div class=\"daexthefup-yes daexthefup-button daexthefup-button-type-icon\" data-value=\"1\">\r\n\t\t\t\t\r\n                <svg>\r\n                    <defs>\r\n                        <style>.thumb-up-cls-1{fill:#c9c9c9;}.thumb-up-cls-2{fill:#e1e1e1;}.thumb-up-cls-3{fill:#676767;}<\/style>\r\n                    <\/defs>\r\n                    <g id=\"thumb_up\">\r\n                        <path class=\"thumb-up-cls-2 daexthefup-icon-circle\" d=\"m24,3c11.58,0,21,9.42,21,21s-9.42,21-21,21S3,35.58,3,24,12.42,3,24,3m0-1C11.85,2,2,11.85,2,24s9.85,22,22,22,22-9.85,22-22S36.15,2,24,2h0Z\" \/>\r\n                        <g>\r\n                            <rect class=\"thumb-up-cls-3 daexthefup-icon-secondary-color\" x=\"10\" y=\"20\" width=\"6\" height=\"15\" rx=\"1.5\" ry=\"1.5\" \/>\r\n                            <path class=\"thumb-up-cls-1 daexthefup-icon-primary-color\" d=\"m30.57,9.06l-.49-.1c-.81-.17-1.61.35-1.78,1.16l-5.3,11.74c-.17.81,3.16,1.61,3.97,1.78l1.96.41c.81.17,1.61-.35,1.78-1.16l2.18-10.27c.34-1.61-.7-3.21-2.31-3.56Z\" \/>\r\n                            <path class=\"thumb-up-cls-1 daexthefup-icon-primary-color\" d=\"m38.17,20h-18.67c-.83,0-1.5.67-1.5,1.5v12c0,.83.67,1.5,1.5,1.5h16.27c.71,0,1.33-.5,1.47-1.21l2.4-12c.19-.93-.53-1.8-1.47-1.8Z\" \/>\r\n                        <\/g>\r\n                    <\/g>\r\n                <\/svg>\t\t\t<\/div>\r\n\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t<div class=\"daexthefup-no daexthefup-button daexthefup-button-type-icon\" data-value=\"0\">\r\n\t\t\t\t\r\n                <svg>\r\n                    <defs>\r\n                        <style>.thumb-down-cls-1{fill:#c9c9c9;}.thumb-down-cls-2{fill:#e1e1e1;}.thumb-down-cls-3{fill:#676767;}<\/style>\r\n                    <\/defs>\r\n                    <g id=\"thumb_down\">\r\n                        <path class=\"thumb-down-cls-2 daexthefup-icon-circle\" d=\"m24,3c11.58,0,21,9.42,21,21s-9.42,21-21,21S3,35.58,3,24,12.42,3,24,3m0-1C11.85,2,2,11.85,2,24s9.85,22,22,22,22-9.85,22-22S36.15,2,24,2h0Z\" \/>\r\n                        <g>\r\n                            <rect class=\"thumb-down-cls-3 daexthefup-icon-secondary-color\" x=\"10\" y=\"13\" width=\"6\" height=\"15\" rx=\"1.5\" ry=\"1.5\" \/>\r\n                            <path class=\"thumb-down-cls-1 daexthefup-icon-primary-color\" d=\"m30.57,38.94l-.49.1c-.81.17-1.61-.35-1.78-1.16l-5.3-11.74c-.17-.81,3.16-1.61,3.97-1.78l1.96-.41c.81-.17,1.61.35,1.78,1.16l2.18,10.27c.34,1.61-.7,3.21-2.31,3.56Z\" \/>\r\n                            <path class=\"thumb-down-cls-1 daexthefup-icon-primary-color\" d=\"m38.17,28h-18.67c-.83,0-1.5-.67-1.5-1.5v-12c0-.83.67-1.5,1.5-1.5h16.27c.71,0,1.33.5,1.47,1.21l2.4,12c.19.93-.53,1.8-1.47,1.8Z\" \/>\r\n                        <\/g>\r\n                    <\/g>\r\n                <\/svg>\t\t\t<\/div>\r\n\r\n\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\r\n\t\t\t\t<div class=\"daexthefup-comment\">\r\n\t\t\t\t\t<div class=\"daexthefup-comment-top-container\">\r\n\t\t\t\t\t\t<label id=\"daexthefup-comment-label\" class=\"daexthefup-comment-label\"><\/label>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"daexthefup-comment-character-counter-container\">\r\n\t\t\t\t\t\t\t\t<div id=\"daexthefup-comment-character-counter-number\"\r\n\t\t\t\t\t\t\t\t\tclass=\"daexthefup-comment-character-counter-number\"><\/div>\r\n\t\t\t\t\t\t\t\t<div class=\"daexthefup-comment-character-counter-text\"><\/div>\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<textarea id=\"daexthefup-comment-textarea\" class=\"daexthefup-comment-textarea\"\r\n\t\t\t\t\t\t\t\tplaceholder=\"Type your message\"\r\n\t\t\t\t\t\t\t\tmaxlength=\"\r\n\t\t\t\t\t\t\t\t400\t\t\t\t\t\t\t\t\t\"><\/textarea>\r\n\t\t\t\t\t<div class=\"daexthefup-comment-buttons-container\">\r\n\t\t\t\t\t\t<button class=\"daexthefup-comment-submit daexthefup-button\">Submit<\/button>\r\n\t\t\t\t\t\t<button class=\"daexthefup-comment-cancel daexthefup-button\">Cancel<\/button>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\r\n\t\t\t\t<div class=\"daexthefup-successful-submission-text\">Thanks for your feedback!<\/div>\r\n\r\n\t\t\t<\/div>\r\n\r\n\t\t\t","protected":false},"excerpt":{"rendered":"<p>Explore the Ways of Writing Data-driven or Parameterized Tests with the Spock Framework: In this Free Spock Training Tutorial Series, we explored all about Unit Testing in Spock and Test fixtures, Assertions and Reporting in our previous tutorial. In this tutorial, we will try to understand what parameterized tests are &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Data-driven or Parameterized Testing With Spock Framework\" class=\"read-more button\" href=\"https:\/\/www.softwaretestinghelp.com\/parameterized-testing-spock\/#more-81997\" aria-label=\"Read more about Data-driven or Parameterized Testing With Spock Framework\">Read more<\/a><\/p>\n","protected":false},"author":9,"featured_media":82035,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_helpful_pro_status":1,"footnotes":""},"categories":[408],"tags":[],"class_list":{"0":"post-81997","1":"page","2":"type-page","3":"status-publish","4":"has-post-thumbnail","6":"category-java"},"acf":[],"_links":{"self":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/pages\/81997","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/comments?post=81997"}],"version-history":[{"count":3,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/pages\/81997\/revisions"}],"predecessor-version":[{"id":405367,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/pages\/81997\/revisions\/405367"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/media\/82035"}],"wp:attachment":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/media?parent=81997"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/categories?post=81997"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/tags?post=81997"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}