{"id":10565,"date":"2012-09-15T17:59:00","date_gmt":"2012-09-15T16:59:00","guid":{"rendered":"http:\/\/touk.pl\/blog\/?guid=4487c8802be7c090371cc8fa9c5b4c63"},"modified":"2022-08-02T11:34:40","modified_gmt":"2022-08-02T09:34:40","slug":"how-to-automate-tests-with-groovy-2-0-spock-and-gradle","status":"publish","type":"post","link":"https:\/\/touk.pl\/blog\/2012\/09\/15\/how-to-automate-tests-with-groovy-2-0-spock-and-gradle\/","title":{"rendered":"How to automate tests with Groovy 2.0, Spock and Gradle"},"content":{"rendered":"<p>This is the launch of the 1st blog in my life, so cheers and have a nice reading!<\/p>\n<h2 id=\"y-u-no-test\">y u no test?<\/h2>\n<p><img decoding=\"async\" style=\"clear: left;float: left;margin-bottom: 1em;margin-right: 1em\" src=\"http:\/\/3.bp.blogspot.com\/-fB_au9Dd1do\/UFsYUNLgheI\/AAAAAAAAAEA\/IxCjNZFnzIU\/s1600\/y-u-no-guy.jpg\" border=\"0\" \/>Couple of years ago I wasn&#8217;t a big fan of unit testing. It was obvious to me that well prepared unit tests are crucial though. I didn&#8217;t known why exactly crucial yet then. I just felt they are important. My disliking to write automation tests was mostly related to the effort necessary to prepare them. Also a <i>spaghetti code<\/i> was easily spotted in test sources.<\/p>\n<h2 id=\"some-goodies-at-hand\">Some goodies at hand<\/h2>\n<p>Now I know! Test are crucial to get a better design and a confidence. Confidence to improve without a hesitation. Moreover, now I have the tool to make test automation <i>easy as Sunday morning<\/i>&#8230; I&#8217;m talking about the <i><a href=\"http:\/\/code.google.com\/p\/spock\/\">Spock Framework<\/a><\/i>. If you got here probably already know what the Spock is, so I won&#8217;t introduce it. Enough to say that Spock is an awesome unit testing tool which, thanks to Groovy AST Transformation, simplifies creation of tests greatly.<\/p>\n<h2 id=\"an-obstacle\">An obstacle<\/h2>\n<p>The point is, since a new major version of Groovy has been released (2.0), there is no matching version of Spock available yet.<\/p>\n<h2 id=\"what-now\">What now?<\/h2>\n<p>Well, in a matter of fact there is such a version. It&#8217;s still under development though. It can be obtained from <a href=\"http:\/\/oss.sonatype.org\/content\/repositories\/snapshots\/\">this <i>Maven<\/i> repository<\/a>. We can of course use the <i>Maven<\/i> to build a project and run tests. But why not to go even more &#8220;groovy&#8221; way? XML is not for humans, is it? Lets use <i><a href=\"http:\/\/www.gradle.org\/\">Gradle<\/a><\/i>.<\/p>\n<h2 id=\"the-build-file\">The build file<\/h2>\n<p><u>Update:<\/u> at the end of the post is updated version of the build file.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">apply plugin: 'groovy'\r\napply plugin: 'idea'\r\n\r\ndef langLevel = 1.7\r\n\r\nsourceCompatibility = langLevel\r\ntargetCompatibility = langLevel\r\n\r\ngroup = 'com.tamashumi.example.testwithspock'\r\nversion = '0.1'\r\n\r\nrepositories {\r\n    mavenLocal()\r\n    mavenCentral()\r\n    maven { url 'http:\/\/oss.sonatype.org\/content\/repositories\/snapshots\/' }\r\n}\r\n\r\ndependencies {\r\n    groovy 'org.codehaus.groovy:groovy-all:2.0.1'\r\n    testCompile 'org.spockframework:spock-core:0.7-groovy-2.0-SNAPSHOT'\r\n}\r\n\r\nidea {\r\n    project {\r\n        jdkName = langLevel\r\n        languageLevel = langLevel\r\n    }\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>As you can see the <i>build.gradle<\/i> file is almost self-explanatory. Groovy plugin is applied to compile groovy code. It needs groovy-all.jar &#8211; declared in version 2.0 at dependencies block just next to Spock in version 0.7. What&#8217;s most important, mentioned Maven repository URL is added at repositories block.<\/p>\n<h2 id=\"project-structure-and-execution\">Project structure and execution<\/h2>\n<p>Gradle&#8217;s default project directory structure is similar to Maven&#8217;s one. Unfortunately there is no &#8216;create project&#8217; task and you have to create it by hand. It&#8217;s not a big obstacle though. The structure you will create will more or less look as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;project root&gt;\r\n\u2502\r\n\u251c\u2500\u2500 build.gradle\r\n\u2514\u2500\u2500 src\r\n    \u251c\u2500\u2500 main\r\n    \u2502   \u2514\u2500\u2500 groovy\r\n    \u2514\u2500\u2500 test\r\n        \u2514\u2500\u2500 groovy<\/pre>\n<p>To build a project now you can type command <span style=\"font-family: 'Courier New',Courier,monospace\">gradle build<\/span> or <span style=\"font-family: 'Courier New',Courier,monospace\">gradle test<\/span> to only run tests.<\/p>\n<h2 id=\"how-about-java\">How about Java?<\/h2>\n<p><b>You can test native Java code with Spock.<\/b> Just add <span style=\"font-family: 'Courier New',Courier,monospace\">src\/main\/java<\/span> directory and a following line to the <i>build.gradle<\/i>:<\/p>\n<p>apply plugin: &#8216;java&#8217;<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">apply plugin: 'java'<\/pre>\n<p>This way if you don&#8217;t want or just can&#8217;t deploy Groovy compiled stuff into your production JVM for any reason, still whole goodness of testing with Spock and Groovy is at your hand.<\/p>\n<h2 id=\"a-silly-simple-example\">A silly-simple example<\/h2>\n<p>Just to show that it works, here you go with a basic example.<\/p>\n<h4 id=\"java-simple-example-class\">Java simple example class:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">public class SimpleJavaClass {\r\n\r\n    public int sumAll(int...args) {\r\n        int sum = 0;\r\n        for (int arg: args) {\r\n            sum += arg;\r\n        }\r\n        return sum;\r\n    }\r\n}<\/pre>\n<h4 id=\"groovy-simple-example-class\">Groovy simple example class:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">class SimpleGroovyClass {\r\n\r\n    String concatenateAll(char separator, String...args) {\r\n        args.join(separator as String)\r\n    }\r\n}<\/pre>\n<h4 id=\"the-test-uhm-i-mean-the-specification\">The test, uhm&#8230; I mean the <i>Specification<\/i>:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">class JustASpecification extends Specification {\r\n\r\n    @Unroll('Sums integers #integers into: #expectedResult')\r\n    def \"Can sum different amount of integers\"() {\r\n        given:\r\n            def instance = new SimpleJavaClass()\r\n        when:\r\n            def result = instance.sumAll( * integers)\r\n        then:\r\n            result == expectedResult\r\n\r\n        where:\r\n            expectedResult | integers\r\n\r\n        11 | [3, 3, 5]\r\n        8 | [3, 5]\r\n        254 | [2, 4, 8, 16, 32, 64, 128]\r\n        22 | [7, 5, 6, 2, 2]\r\n    }\r\n\r\n    @Unroll('Concatenates strings #strings with separator \"#separator\" into: #expectedResult')\r\n    def \"Can concatenate different amount of integers with a specified separator\"() {\r\n        given:\r\n            def instance = new SimpleGroovyClass()\r\n\r\n        when:\r\n            def result = instance.concatenateAll(separator, * strings)\r\n\r\n        then:\r\n            result == expectedResult\r\n        where:\r\n            expectedResult | separator | strings\r\n\r\n        'Whasup dude?' | ' '\r\n        as char | ['Whasup', 'dude?']\r\n        '2012\/09\/15' | '\/'\r\n        as char | ['2012', '09', '15']\r\n        'nice-to-meet-you' | '-'\r\n        as char | ['nice', 'to', 'meet', 'you']\r\n    }\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>To run tests with <i>Gradle<\/i> simply execute command <span style=\"font-family: 'Courier New',Courier,monospace\">gradle test<\/span>. Test reports can be found at <span style=\"font-family: 'Courier New',Courier,monospace\">&lt;project root&gt;\/build\/reports\/tests\/index.html<\/span> and look kind a like this.<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a style=\"margin-left: 1em;margin-right: 1em\" href=\"http:\/\/2.bp.blogspot.com\/-ElCEDWh_5JI\/UFSuwkc_q7I\/AAAAAAAAADk\/rEU3HVTkaG8\/s1600\/Gradle+test+report.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-ElCEDWh_5JI\/UFSuwkc_q7I\/AAAAAAAAADk\/rEU3HVTkaG8\/s400\/Gradle+test+report.png\" width=\"400\" height=\"218\" border=\"0\" \/><\/a><\/div>\n<p>Please note that, thanks to <span style=\"font-family: 'Courier New',Courier,monospace\">@Unroll<\/span> annotation, test is executed once per each parameters row in the &#8216;table&#8217; at specification&#8217;s <span style=\"font-family: 'Courier New',Courier,monospace\">where: block<\/span>. This isn&#8217;t a Java label, but a AST transformation magic.<\/p>\n<h2 id=\"ide-integration\">IDE integration<\/h2>\n<h4 id=\"gradles-plugin-for-iintellij-idea\">Gradle&#8217;s plugin for Iintellij Idea<\/h4>\n<p>I&#8217;ve added also Intellij Idea plugin for IDE project generation and some configuration for it (IDE&#8217;s JDK name). To generate Idea&#8217;s project files just run command: <span style=\"font-size: small\"><span style=\"font-family: 'Courier New',Courier,monospace\">gradle idea<\/span><\/span> There are available Eclipse and Netbeans plugins too, however I haven&#8217;t tested them. Idea&#8217;s one works well.<\/p>\n<h4 id=\"intellij-ideas-plugins-for-gradle\">Intellij Idea&#8217;s plugins for Gradle<\/h4>\n<p>Idea itself has a light Gradle support built-in on its own. To not get confused: Gradle has plugin for Idea and Idea has plugin for Gradle. To get even more &#8216;pluginated&#8217;, there is also JetGradle plugin within Idea. However I haven&#8217;t found good reason for it&#8217;s existence &#8211; well, maybe excluding one. It shows dependency tree. There is a bug though &#8211; JetGradle work&#8217;s fine only for lang level 1.6. Strangely all the plugins together do not conflict each other. They even give complementary, quite useful tool set.<\/p>\n<h4 id=\"running-tests-under-ide\">Running tests under IDE<\/h4>\n<p>Jest to add something sweet this is how Specification looks when run with jUnit\u00a0 runner under Intellij Idea (right mouse button on JustASpecification class or whole folder of specification extending classes and select &#8220;Run &#8230;&#8221;. You&#8217;ll see a nice view like this.<\/p>\n<div class=\"separator\" style=\"clear: both;text-align: center\"><a style=\"margin-left: 1em;margin-right: 1em\" href=\"http:\/\/1.bp.blogspot.com\/-_aq6V0t7-dg\/UFShUDWcaFI\/AAAAAAAAADU\/6Kfg819Sv5Y\/s1600\/Spock+test+run+from+Idea+with+%2540Unroll.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/1.bp.blogspot.com\/-_aq6V0t7-dg\/UFShUDWcaFI\/AAAAAAAAADU\/6Kfg819Sv5Y\/s400\/Spock+test+run+from+Idea+with+%2540Unroll.png\" width=\"400\" height=\"140\" border=\"0\" \/><\/a><\/div>\n<h2 id=\"building-web-application\">Building web application<\/h2>\n<p>If you need to build Java web application and bundle it as <i>war<\/i> archive just add plugin by typing the line<\/p>\n<pre class=\"brush:groovy\">apply plugin: 'war'<\/pre>\n<p>in the <i>build.gradle<\/i> file and create a directory <span style=\"font-family: 'Courier New',Courier,monospace\">src\/main\/webapp<\/span>.<\/p>\n<h2 id=\"want-to-know-more\">Want to know more?<\/h2>\n<p>If you haven&#8217;t heard about Spock or Gradle before or just curious, check the following links:<\/p>\n<ul>\n<li><a href=\"http:\/\/code.google.com\/p\/spock\/wiki\/\">Spock wiki<\/a> (most important info is under SpockBasics and Interactions)<\/li>\n<li><a href=\"http:\/\/gradle.org\/docs\/current\/userguide\/userguide.html\">Gradle user guide<\/a><\/li>\n<\/ul>\n<h2 id=\"what-next\">What next?<\/h2>\n<p>The last thing left is to write the real production code you are about to test. No matter will it be Groovy or Java, I leave this to your need and invention. Of course, you are welcome to post a comments here. I&#8217;ll answer or even write some more posts about the subject.<\/p>\n<h2 id=\"important-update\">Important update<\/h2>\n<p>Spock version 0.7 has been released, so the above build file doesn&#8217;t work anymore. It&#8217;s easy to fix it though. Just remove last dash and a word SNAPSHOT from Spock dependency declaration. Other important thing is that now spock-core depends on groovy-all-2.0.5, so to avoid dependency conflict groovy dependency should be changed from version 2.0.1 to 2.0.5.<br \/>\nBesides oss.sonata.org snapshots maven repository can be removed. No obstacles any more and the build file now looks as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">apply plugin: 'groovy'\r\n\r\napply plugin: 'idea'\r\n\r\ndef langLevel = 1.7\r\n\r\nsourceCompatibility = langLevel\r\n\r\ntargetCompatibility = langLevel\r\n\r\ngroup = 'com.tamashumi.example.testwithspock'\r\n\r\nversion = '0.1'\r\n\r\nrepositories {\r\n    mavenLocal()\r\n    mavenCentral()\r\n}\r\n\r\ndependencies {\r\n    groovy 'org.codehaus.groovy:groovy-all:2.0.5'\r\n    testCompile 'org.spockframework:spock-core:0.7-groovy-2.0'\r\n}\r\n\r\nidea {\r\n    project {\r\n        jdkName = langLevel\r\n        languageLevel = langLevel\r\n\r\n    }\r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"This is the launch of the 1st blog in my life, so cheers and have a nice reading!\ny u no test?\nCouple of years ago I wasn&#8217;t a big fan of unit testing. It was obvious to me that well prepared unit tests are crucial though. I didn&#8217;t known why exactly crucial yet then. I just felt they are important. My disliking to write automation tests was mostly related to the effort necessary to prepare them. Also a spaghetti code was easily spotted in test sources.\nSome goodies at hand\nNow I know! Test are crucial to get a better design and a confidence. Confidence to improve without a hesitation. Moreover, now I have the tool to make test automation easy as Sunday morning&#8230; I&#8217;m talking about the Spock Framework. If you got here probably already know what the Spock is, so I won&#8217;t introduce it. Enough to say that Spock is an awesome unit testing tool which, thanks to Groovy AST Transformation, simplifies creation of tests greatly.\nAn obstacle\nThe point is, since a new major version of Groovy has been released (2.0), there is no matching version of Spock available yet.\nWhat now?\nWell, in a matter of fact there is such a version. It&#8217;s still under development though. It can be obtained from this Maven repository. We can of course use the Maven to build a project and run tests. But why not to go even more &#8220;groovy&#8221; way? XML is not for humans, is it? Lets use Gradle.\nThe build file\nUpdate: at the end of the post is updated version of the build file.\napply plugin: 'groovy'\r\napply plugin: 'idea'\r\ndef langLevel = 1.7\r\nsourceCompatibility = langLevel\r\ntargetCompatibility = langLevel\r\ngroup = 'com.tamashumi.example.testwithspock'\r\nversion = '0.1'\r\nrepositories {\r\n    mavenLocal()\r\n    mavenCentral()\r\n    maven { url 'http:\/\/oss.sonatype.org\/content\/repositories\/snapshots\/' }\r\n}\r\ndependencies {\r\n    groovy 'org.codehaus.groovy:groovy-all:2.0.1'\r\n    testCompile 'org.spockframework:spock-core:0.7-groovy-2.0-SNAPSHOT'\r\n}\r\nidea {\r\n    project {\r\n        jdkName = langLevel\r\n        languageLevel = langLevel\r\n    }\r\n}\nAs you can see the build.gradle file is almost self-explanatory. Groovy plugin is applied to compile groovy code. It needs groovy-all.jar &#8211; declared in version 2.0 at dependencies block just next to Spock in version 0.7. What&#8217;s most important, mentioned Maven repository URL is added at repositories block.\nProject structure and execution\nGradle&#8217;s default project  directory structure is similar to Maven&#8217;s one. Unfortunately there is no &#8216;create project&#8217; task and you have to create it by hand. It&#8217;s not a big obstacle though.  The structure you will create will more or less look as follows:   \n&lt;project root&gt;\r\n&#9474;\r\n&#9500;&#9472;&#9472; build.gradle\r\n&#9492;&#9472;&#9472; src\r\n    &#9500;&#9472;&#9472; main\r\n    &#9474;   &#9500;&#9472;&#9472; groovy\r\n    &#9492;&#9472;&#9472; test\r\n        &#9492;&#9472;&#9472; groovy\nTo build a project now you can type command gradle build or gradle test to only run tests.\nHow about Java?\nYou can test native Java  code with Spock.  Just add src\/main\/java directory and a following line to the build.gradle:   \napply plugin: 'java'\nThis way if you don&#8217;t want or just can&#8217;t deploy Groovy compiled stuff into your production JVM for any reason, still whole goodness of testing with Spock and Groovy is at your hand.\nA silly-simple example \nJust to show that it works, here you go with a basic example.\nJava simple example class:\npublic class SimpleJavaClass {\r\n    public int sumAll(int... args) {\r\n        int sum = 0;\r\n        for (int arg : args){\r\n            sum += arg;\r\n        }\r\n        return sum;\r\n    }\r\n}\nGroovy simple example class:\nclass SimpleGroovyClass {\r\n    String concatenateAll(char separator, String... args) {\r\n        args.join(separator as String)\r\n    }\r\n}\nThe test, uhm&#8230; I mean the Specification:\nclass JustASpecification extends Specification {\r\n    @Unroll('Sums integers #integers into: #expectedResult')\r\n    def \"Can sum different amount of integers\"() {\r\n        given:\r\n            def instance = new SimpleJavaClass()\r\n        when:\r\n            def result = instance.sumAll(* integers)\r\n        then:\r\n            result == expectedResult\r\n        where:\r\n            expectedResult | integers\r\n            11             | [3, 3, 5]\r\n            8              | [3, 5]\r\n            254            | [2, 4, 8, 16, 32, 64, 128]\r\n            22             | [7, 5, 6, 2, 2]\r\n    }\r\n    @Unroll('Concatenates strings #strings with separator \"#separator\" into: #expectedResult')\r\n    def \"Can concatenate different amount of integers with a specified separator\"() {\r\n        given:\r\n            def instance = new SimpleGroovyClass()\r\n        when:\r\n            def result = instance.concatenateAll(separator, * strings)\r\n        then:\r\n            result == expectedResult\r\n        where:\r\n            expectedResult     | separator   | strings\r\n            'Whasup dude?'     | ' ' as char | ['Whasup', 'dude?']\r\n            '2012\/09\/15'       | '\/' as char | ['2012', '09', '15']\r\n            'nice-to-meet-you' | '-' as char | ['nice', 'to', 'meet', 'you']\r\n    }\r\n} \nTo run tests with Gradle simply execute command gradle test. Test reports can be found at &lt;project root&gt;\/build\/reports\/tests\/index.html and look kind a like this.\n\n\nPlease note that, thanks to @Unroll annotation, test is executed once per each parameters row in the &#8216;table&#8217; at specification&#8217;s where: block. This isn&#8217;t a Java label, but a AST transformation magic.\nIDE integration\nGradle&#8217;s plugin for Iintellij Idea\nI&#8217;ve added also Intellij Idea plugin for IDE project generation and some configuration for it (IDE&#8217;s JDK name). To generate  Idea&#8217;s project files just run command: gradle idea  There are available Eclipse and Netbeans plugins too, however I haven&#8217;t tested them. Idea&#8217;s one works well.\nIntellij Idea&#8217;s plugins for Gradle\nIdea itself has a light Gradle support built-in on its own. To not get  confused: Gradle has plugin for Idea and Idea has plugin for Gradle. To  get even more &#8216;pluginated&#8217;, there is also JetGradle plugin within Idea.  However I haven&#8217;t found good reason for it&#8217;s existence &#8211; well, maybe  excluding one. It shows dependency tree. There is a bug though &#8211; JetGradle work&#8217;s fine only for lang level 1.6. Strangely all the plugins together do not conflict each other. They even give complementary, quite useful tool set.\nRunning tests under IDE\nJest to add something sweet this is how Specification looks when run with jUnit&nbsp; runner under Intellij Idea (right mouse button on JustASpecification class or whole folder of specification extending classes and select &#8220;Run &#8230;&#8221;. You&#8217;ll see a nice view like this.\n\nBuilding web application\nIf you need to build Java web application and bundle it as war archive just add plugin by typing the line  \napply plugin: 'war'\nin the build.gradle file and create a directory src\/main\/webapp. \nWant to know more?\nIf you haven&#8217;t heard about Spock or Gradle before or just curious, check the following links:  \n\nSpock wiki (most important info is under SpockBasics and Interactions)\nGradle user guide&nbsp;\n\nWhat next?\nThe last thing left is to write the real production code you are about to test. No  matter will it be Groovy or Java, I leave this to your need and invention.  Of course, you are welcome to post a comments here. I&#8217;ll answer or even write some more posts about the subject.\nImportant update\nSpock version 0.7 has been released, so the above build file doesn&#8217;t work anymore. It&#8217;s easy to fix it though. Just remove last dash and a word SNAPSHOT from Spock dependency declaration. Other important thing is that now spock-core depends on groovy-all-2.0.5, so to avoid dependency conflict groovy dependency should be changed from version 2.0.1 to 2.0.5.\nBesides oss.sonata.org snapshots maven repository can be removed. No obstacles any more and the build file now looks as follows: \napply plugin: 'groovy'\r\napply plugin: 'idea'\r\ndef langLevel = 1.7\r\nsourceCompatibility = langLevel\r\ntargetCompatibility = langLevel\r\ngroup = 'com.tamashumi.example.testwithspock'\r\nversion = '0.1'\r\nrepositories {\r\n    mavenLocal()\r\n    mavenCentral()\r\n}\r\ndependencies {\r\n    groovy 'org.codehaus.groovy:groovy-all:2.0.5'\r\n    testCompile 'org.spockframework:spock-core:0.7-groovy-2.0'\r\n}\r\nidea {\r\n    project {\r\n        jdkName = langLevel\r\n        languageLevel = langLevel\r\n    }\r\n}\n","protected":false},"author":43,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[50,68,411,30],"_links":{"self":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts\/10565"}],"collection":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/users\/43"}],"replies":[{"embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/comments?post=10565"}],"version-history":[{"count":7,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts\/10565\/revisions"}],"predecessor-version":[{"id":14808,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/posts\/10565\/revisions\/14808"}],"wp:attachment":[{"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/media?parent=10565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/categories?post=10565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/touk.pl\/blog\/wp-json\/wp\/v2\/tags?post=10565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}