{"id":81994,"date":"2019-05-31T11:44:24","date_gmt":"2019-05-31T11:44:24","guid":{"rendered":"https:\/\/www.softwaretestinghelp.com\/?page_id=81994"},"modified":"2025-04-01T08:10:09","modified_gmt":"2025-04-01T08:10:09","slug":"spock-and-groovy","status":"publish","type":"page","link":"https:\/\/www.softwaretestinghelp.com\/spock-and-groovy\/","title":{"rendered":"Spock Tutorial: Testing With Spock And Groovy"},"content":{"rendered":"\n<p><strong>Hands-on Spock Tutorial Series: <\/strong>Testing with Spock Framework and Groovy Programming Language<\/p>\n\n\n\n<p>This series of tutorials would completely enrich your knowledge of Spock Framework.<\/p>\n\n\n\n<p>Simple and clear examples have been included in each tutorial for your easy understanding of the concept.<\/p>\n\n\n\n<p><em><strong>Get Ready To Learn Spock For Free!!<\/strong><\/wp-block><\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"900\" height=\"507\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/Spock-Tutorial-Testing-With-Spock-And-Groovy.png\" alt=\"Spock Tutorial: Testing With Spock And Groovy\" class=\"wp-image-349371\" style=\"width:700px\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/Spock-Tutorial-Testing-With-Spock-And-Groovy.png 900w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/Spock-Tutorial-Testing-With-Spock-And-Groovy-300x169.png 300w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/Spock-Tutorial-Testing-With-Spock-And-Groovy-768x433.png 768w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/Spock-Tutorial-Testing-With-Spock-And-Groovy-240x135.png 240w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>List of All the Spock Tutorials in this Series:<\/strong><\/p>\n\n\n\n<p>Learn Spock in detail with the help of this Intensive Spock Training series for beginners and experienced professionals.<\/p>\n\n\n\n<div id=\"tablepress-743-scroll-wrapper\" class=\"tablepress-scroll-wrapper\">\n<table id=\"tablepress-743\" class=\"tablepress tablepress-id-743 tablepress-responsive\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">Tutorial #<\/th><th class=\"column-2\">Link<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\"><strong>Tutorial #1<\/strong><\/td><td class=\"column-2\"><strong><a href=\"https:\/\/www.softwaretestinghelp.com\/spock-and-groovy\/\">Introduction to Spock and Groovy<\/a><\/strong><\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\"><strong>Tutorial #2<\/strong><\/td><td class=\"column-2\"><strong><a href=\"https:\/\/www.softwaretestinghelp.com\/unit-testing-with-spock\/\">Writing Unit Tests with Spock<\/a><\/strong><\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\"><strong>Tutorial #3<\/strong><\/td><td class=\"column-2\"><strong><a href=\"https:\/\/www.softwaretestinghelp.com\/parameterized-testing-spock\/\">Parameterized Testing With Spock<\/a><\/strong><\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\"><strong>Tutorial #4<\/strong><\/td><td class=\"column-2\"><strong><a href=\"https:\/\/www.softwaretestinghelp.com\/spock-mocking-and-stubbing\/\">Spock Mocking and Stubbing<\/a><\/strong><\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\"><strong>Tutorial #5<\/strong><\/td><td class=\"column-2\"><strong><a href=\"https:\/\/www.softwaretestinghelp.com\/integration-functional-testing-spock-selenium\/\">Spock with Selenium Functional Test<\/a><\/strong><\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-1\"><strong>Tutorial #6<\/strong><\/td><td class=\"column-2\"><strong><a href=\"https:\/\/www.softwaretestinghelp.com\/spock-interview-questions\/\">Spock Interview Questions<\/a><\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<!-- #tablepress-743 from cache -->\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Overview of Tutorials in Spock Series<\/strong><\/p>\n\n\n\n<div id=\"tablepress-744-scroll-wrapper\" class=\"tablepress-scroll-wrapper\">\n<table id=\"tablepress-744\" class=\"tablepress tablepress-id-744 tablepress-responsive\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">Tutorial_Num<\/th><th class=\"column-2\">What You Will Learn<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\"><strong>Tutorial #1<\/strong><\/td><td class=\"column-2\"><strong><a href=\"https:\/\/www.softwaretestinghelp.com\/spock-and-groovy\/\">Introduction to Spock and Groovy<\/a><\/strong><br \/>\n<br \/>\nThis introductory tutorial will explain all about Spock, which is a test framework that\u2019s built on top of Groovy. It enforces BDD at the core and ensures all tests written using the framework follows the BDD conventions.<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\"><strong>Tutorial #2<\/strong><\/td><td class=\"column-2\"><strong><a href=\"https:\/\/www.softwaretestinghelp.com\/unit-testing-with-spock\/\">Writing Unit Tests with Spock<\/a><\/strong><br \/>\n<br \/>\nIn this tutorial, we will walk through all the details\/steps that are required to get started with Unit testing in Spock along with simple examples.<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\"><strong>Tutorial #3<\/strong><\/td><td class=\"column-2\"><strong><a href=\"https:\/\/www.softwaretestinghelp.com\/parameterized-testing-spock\/\">Parameterized Testing With Spock<\/a><\/strong><br \/>\n<br \/>\nThis tutorial will clearly explain what parameterized tests are and how you can leverage the in-built features of Spock to achieve data-driven testing.<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\"><strong>Tutorial #4<\/strong><\/td><td class=\"column-2\"><strong><a href=\"https:\/\/www.softwaretestinghelp.com\/spock-mocking-and-stubbing\/\">Spock Mocking and Stubbing<\/a><\/strong><br \/>\n<br \/>\nThis Spock tutorial will explain in detail about Mocking and Stubbing which are one of the most essential building blocks of extensive Unit tests.<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\"><strong>Tutorial #5<\/strong><\/td><td class=\"column-2\"><strong><a href=\"https:\/\/www.softwaretestinghelp.com\/integration-functional-testing-spock-selenium\/\">Spock with Selenium Functional Test<\/a><\/strong><br \/>\n<br \/>\nLearn how to use Spock for Integration testing (like rest services) and for functional testing from this informative tutorial. For Example, Integrating Spock with Selenium.<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-1\"><strong>Tutorial #6<\/strong><\/td><td class=\"column-2\"><strong><a href=\"https:\/\/www.softwaretestinghelp.com\/spock-interview-questions\/\">Spock Interview Questions<\/a><\/strong><br \/>\n<br \/>\nThis tutorial includes a list of the Most popular Spock Interview Questions with Answers and examples. These questions would indeed guide anyone to clear the spock interview successfully at the first attempt.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<!-- #tablepress-744 from cache -->\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">What is Spock?<\/h3>\n\n\n\n<p>Spock is a test framework that\u2019s built on top of Groovy. It enforces BDD at the core and ensures that all tests written using the framework follow the BDD conventions.<\/p>\n\n\n\n<p>Also, unlike JUnit, Spock has its own Mocking and test double libraries as well as full support for parameterized test scenarios.<\/p>\n\n\n\n<p>It is due to this complete package in itself, that the Spock specifications are super readable and expressive, and as a result, they make the test achieve more and more of what it was intended for reducing the clich\u00e9 boilerplate code.<\/p>\n\n\n\n<p>Despite all these cool features, Spock tests are runnable using the existing JUnit test runner &amp; the existing command line\/build tools like Maven and Gradle, which make it even more compelling to use. In a nutshell, Spock combines all the good features of JUnit, <a href=\"https:\/\/www.softwaretestinghelp.com\/testers-in-tdd-bdd-atdd-techniques\/\">BDD<\/a> (frameworks like JBehave &amp; <a href=\"https:\/\/www.softwaretestinghelp.com\/selenium-webdriver-cucumber-selenium-tutorial-31\/\">Cucumber<\/a>) as well as mocking.<\/p>\n\n\n\n<p>We will take a look at a couple of examples illustrating each of these features in the further sections.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color: #ff6600;\">Watch the Spock and Groovy Video Tutorial<\/span><\/h3>\n\n\n\n<p><iframe src=\"https:\/\/www.youtube.com\/embed\/aomDSzf-HoE\" width=\"650\" height=\"350\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is Groovy?<\/h3>\n\n\n\n<p>Groovy is a scripting language for the Java platform.<\/p>\n\n\n\n<p><span style=\"color: #ff6600;\"><strong>Some of the main features of Groovy include:<\/strong><\/span><\/p>\n\n\n\n<p><strong>#1)<\/strong> It can be used as dynamically typed (where a variable can hold any type of data) as well as statically typed (which enforces strongly typed constructs on variables holding data).<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\"><strong>Example<\/strong><\/span>: We have assigned array and map in the same way and internally groovy determines the type and handles it appropriately.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; title: ; notranslate\" title=\"\">\ndef listType = &#x5B;1,2,3]\ndef mapType = &#x5B;\"red\":2,\"green\":3]\n \nprintln(listType.getClass())\nprintln(mapType.getClass())\n<\/pre><\/div>\n\n\n<p><strong>The output of the above code sample is:<\/strong><\/p>\n\n\n\n<p><strong>class<\/strong>&nbsp;java.util.ArrayList<br><strong>class<\/strong>&nbsp;java.util.LinkedHashMap<\/p>\n\n\n\n<p><strong>#2)<\/strong> All valid Java code is a valid Groovy code too (but not the other way round as it has additional features as well).<\/p>\n\n\n\n<p><strong>#3)<\/strong> Other features include meta-programming, closures, static type checking, etc.<\/p>\n\n\n\n<p><strong>#4)<\/strong> Unlike <a href=\"https:\/\/www.softwaretestinghelp.com\/java\/\">Java<\/a> semicolons are optional in Groovy and the primitive types are considered as objects by default.<\/p>\n\n\n\n<p>As this tutorial series is more focused on Spock, we\u2019ll just learn that Groovy features that are essential for authoring Spock-based test specifications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Getting Started with Spock<\/h3>\n\n\n\n<p>To get started, let\u2019s see, what libraries are required depending on what build system you are using (ex. Gradle \/ maven).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span style=\"color: #ff6600;\">For Maven based projects<\/span><\/h4>\n\n\n\n<p>Maven projects will need to include a plugin for compiling Gradle code as well as a surefire plugin to run Groovy-based specifications. In addition to this groovy &amp; Spock, <a href=\"https:\/\/mvnrepository.com\/artifact\/org.spockframework\/spock-core\/1.3-groovy-2.5\" target=\"_blank\" rel=\"noopener nofollow\">dependencies<\/a> should also be added.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; title: ; notranslate\" title=\"\">\n&lt;plugins&gt;\n                  &lt;plugin&gt;\n                         &lt;groupId&gt;org.codehaus.gmavenplus&lt;\/groupId&gt;\n                         &lt;artifactId&gt;gmavenplus-plugin&lt;\/artifactId&gt;\n                         &lt;version&gt;1.5&lt;\/version&gt;\n                         &lt;executions&gt;\n                               &lt;execution&gt;\n                                        &lt;goals&gt;\n                                                &lt;goal&gt;testCompile&lt;\/goal&gt;\n                                       &lt;\/goals&gt;\n                               &lt;\/execution&gt;\n                          &lt;\/executions&gt;\n               &lt;\/plugin&gt;\n               &lt;plugin&gt;\n                      &lt;artifactId&gt;maven-surefire-plugin&lt;\/artifactId&gt;\n                      &lt;version&gt;2.18.1&lt;\/version&gt;\n                      &lt;configuration&gt;\n                              &lt;useFile&gt;false&lt;\/useFile&gt;\n                              &lt;includes&gt;\n                                     &lt;include&gt;**\/*Spec.java&lt;\/include&gt;\n                              &lt;\/includes&gt;\n                       &lt;\/configuration&gt;\n               &lt;\/plugin&gt;\n&lt;\/plugins&gt;\n&lt;dependency&gt;\n           &lt;groupId&gt;org.spockframework&lt;\/groupId&gt;\n           &lt;artifactId&gt;spock-core&lt;\/artifactId&gt;\n           &lt;version&gt;1.3-groovy-2.5&lt;\/version&gt;\n           &lt;scope&gt;test&lt;\/scope&gt;\n&lt;\/dependency&gt;\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\"><span style=\"color: #ff6600;\">For Gradle based Projects<\/span><\/h4>\n\n\n\n<p>For a sample gradle file as below, the most important requirements include gradle plugin and the dependencies for groovy for code and testing.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; title: ; notranslate\" title=\"\">\nplugins {\n      id 'java'\n       id 'groovy'\n}\n \nrepositories {\n        mavenCentral()\n}\n \ndependencies {\n         compile \"org.codehaus.groovy:groovy-all:2.4.8\"\n         testCompile \"org.spockframework:spock-core:1.1-groovy-2.4\"\n}\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Anatomy of a Spock Specification<\/h3>\n\n\n\n<p>Spock tests can be written for any language that runs on JVM. This means that even if your application code is in Java Scala or Kotlin etc., you can still choose to write your unit\/integration tests in Spock (over others like JUnit, JBehave, etc.).<\/p>\n\n\n\n<p>Spock test classes are called \u201cSpecifications\u201d (Similar to Specs in the BDD world) and you can extend the \u201cSpecification\u201d class of the Spock framework. (Specification is the base class of the Spock framework).<\/p>\n\n\n\n<p>Each Spec file can contain multiple tests (similar to a JUnit test class file) and each test can optionally contain the BDD blocks i.e. given, when and then. This is similar to other BDD frameworks, where each of these sections can be correlated to the Arrange, Act, and Assert sections in the JUnit tests respectively.<\/p>\n\n\n\n<p><strong>Below is a block diagram depicting the hierarchy of Spec and tests.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/TestSpec.png\"><img decoding=\"async\" width=\"592\" height=\"341\" src=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/TestSpec.png\" alt=\"hierarchy of Spec and tests\" class=\"wp-image-82019\" srcset=\"https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/TestSpec.png 592w, https:\/\/www.softwaretestinghelp.com\/wp-content\/qa\/uploads\/2019\/05\/TestSpec-300x173.png 300w\" sizes=\"(max-width: 592px) 100vw, 592px\" \/><\/a><\/figure>\n\n\n\n<p><strong>Let\u2019s see how a sample specification looks in the code:<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; title: ; notranslate\" title=\"\">\nimport spock.lang.Specification\nclass SampleSpec extends Specification {\n \ndef \"check case-insensitive equality of 2 strings\"() {\n             \ngiven:\n    String str1 = \"hello\"\n    String str2 = \"HELLO\"\n             \nwhen:\n     str1 = str1.toLowerCase()\n     str2 = str2.toLowerCase()\n             \nthen:\n      str1 == str2\n \n}\n \ndef \"check addition of 2 numbers\"() {\n        \ngiven:\n       int input1 = 10\n       int input2 = 25\n    \nwhen:\n        int result = input1 + input2\n         \nthen:\n        result == 35\n}\n}\n<\/pre><\/div>\n\n\n<p><strong>Few important points to note here:<\/strong><\/p>\n\n\n\n<p><strong>#1)<\/strong> Look at the name of the test scenarios (the string after the def keyword): \u201ccheck case-insensitive equality of 2 strings\u201d. These are plain English strings and this makes the test names quite readable and gives a real sense to test as to what it achieves.<\/p>\n\n\n\n<p>Compare it to the usual JUnit test where the test name will look as something like c.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">caseEquality_withValidInput_shouldBeEqual()<\/pre>\n\n\n\n<p><strong>#2)<\/strong> Given, when, and then blocks are equivalent to Arrange, Act, and Assert. Out of these look at the then (or assert block) which implies equality assertion and avoids all boilerplate code associated with assertions.<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\"><strong>Example<\/strong><\/span>, An assertion in JUnit would have looked as shown below:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; title: ; notranslate\" title=\"\">\n@Test\npublic void compareStrings_withValidInput_shouldReturnSuccess() {\n      \n\/\/ Arrange\n     String str1 = \"hello\";\n     String str2 = \"HELLO\";\n \n\/\/ Act\n     str1 = str1.toLowerCase();\n     str2 = str2.toLowerCase();\n \n\/\/ Assert\n   Assert.assertEquals(str1,str2);\n} \n<\/pre><\/div>\n\n\n<p>As you can see from the above, the Spock tests make the tests look less verbose as well as avoid all boilerplate code in assertions (and setup, etc.)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Spec Block Descriptions<\/h3>\n\n\n\n<p>For each of the individual blocks in a test, you can choose to provide a block description as a string to provide more details about the block that\u2019s getting executed. This helps provide a more verbose structure to the test.<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\"><strong>Let\u2019s see an Example below:<\/strong><\/span><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndef \"check case-insensitive equality of 2 strings\"() {\n                   \ngiven: \"two input strings\"\n        String str1 = \"hello\"\n        String str2 = \"HELLO\"\n                  \nwhen: \"strings are lowercased\"\n        str1 = str1.toLowerCase()\n        str2 = str2.toLowerCase()\n                  \nthen: \"equal strings should return success\"\n        str1 == str2\n}\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Important Tips<\/h3>\n\n\n\n<p><strong>#1)<\/strong> All the blocks in a Spock based spec are optional. However, if present \u201cwhen\u201d and \u201cthen\u201d should appear together in sequence.<\/p>\n\n\n\n<p><strong>#2)<\/strong> If you just need to validate an assertion (and you don\u2019t have a need for a when block), you can use \u201c<strong>expect<\/strong>\u201d block. It can be used to assert pre-conditions even before when and then blocks (and can be used multiple times in a test).<\/p>\n\n\n\n<p><strong>Let\u2019s see a sample usage of expect like validating the pre-condition before executing the \u201cwhen\u201d block.<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: java; title: ; notranslate\" title=\"\">\ndef &quot;check addition of 2 numbers&quot;() {\n                   \ngiven:\n     int input1 = 10\n     int input2 = 25\n                    \nexpect:\n       input1.getClass().toString() == &quot;class java.lang.Integer&quot;\n       input2.getClass().toString() == &quot;class java.lang.Integer&quot;\n       input1 &lt;= Integer.MAX_VALUE input1 &gt;= Integer.MIN_VALUE\n                   \nwhen:\n      int result = input1 + input2\n                  \nthen:\n      result == 35\n}\n<\/pre><\/div>\n\n\n<p>As shown above, the expect block is trying to assert the class value of the input fields as well as the value of one of the inputs to lie within the range.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p>In this Spock tutorial, we have covered the basics of the Groovy programming language, along with the anatomy or basic building blocks of a Spock Specification.<\/p>\n\n\n\n<p>We created a sample project with the required dependencies to write groovy-based Spock specifications and wrote a sample specification.<\/p>\n\n\n\n<p>In the other tutorials in this series, we will delve deeper into the features provided by the Spock framework and get to know how they make use of groovy language to create clean, and readable test specifications.<\/p>\n\n\n\n<p><em><strong>Stay tuned to our upcoming Spock tutorials to learn more about Test fixtures, Assertions, and Reporting in Spock.<\/strong><\/em><\/p>\n\n\n\n<p><a href=\"https:\/\/www.softwaretestinghelp.com\/unit-testing-with-spock\/\"><strong>NEXT Tutorial<\/strong><\/a><\/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=\"81994\">\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>Hands-on Spock Tutorial Series: Testing with Spock Framework and Groovy Programming Language This series of tutorials would completely enrich your knowledge of Spock Framework. Simple and clear examples have been included in each tutorial for your easy understanding of the concept. Get Ready To Learn Spock For Free!! List of &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Spock Tutorial: Testing With Spock And Groovy\" class=\"read-more button\" href=\"https:\/\/www.softwaretestinghelp.com\/spock-and-groovy\/#more-81994\" aria-label=\"Read more about Spock Tutorial: Testing With Spock And Groovy\">Read more<\/a><\/p>\n","protected":false},"author":9,"featured_media":349371,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_helpful_pro_status":1,"footnotes":""},"categories":[408],"tags":[],"class_list":{"0":"post-81994","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\/81994","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=81994"}],"version-history":[{"count":0,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/pages\/81994\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/media\/349371"}],"wp:attachment":[{"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/media?parent=81994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/categories?post=81994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.softwaretestinghelp.com\/wp-json\/wp\/v2\/tags?post=81994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}