{"id":194,"date":"2023-09-29T14:20:55","date_gmt":"2023-09-29T14:20:55","guid":{"rendered":"https:\/\/yascribe.com\/?page_id=194"},"modified":"2023-10-19T06:53:49","modified_gmt":"2023-10-19T06:53:49","slug":"dataset-testing","status":"publish","type":"page","link":"https:\/\/yascribe.com\/index.php\/dataset-testing\/","title":{"rendered":"Dataset testing"},"content":{"rendered":"\n<p>Dataset testing runs a test plan in parallel with several datasets.<\/p>\n\n\n\n<p>For example, we want to run the following test plan (saved in <em>&#8220;finding-fastest-routes.feature&#8221;<\/em>) in order to test :<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>the fastest route to London<\/li>\n\n\n\n<li>the shortest route to Rome<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code><em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Feature: <\/mark>Finding fastest routes<\/em>\n\n  <em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Scenario:<\/mark> <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">no run <\/mark>: Finding routes to \"Paris\"\n    <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">When <\/mark>I enter \"Paris\" into \"Destination\"\n  <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">  And <\/mark>I click on \"Go\"<\/em>\n\n  <em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Scenario:<\/mark> Finding the fastest route to \"London\"\n    <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">When <\/mark>I find routes to \"London\"\n    <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">And <\/mark>I select \"Fastest route\"<\/em> in \"Found routes\"<\/code><\/pre>\n\n\n\n<p>We will create two datasets for the two cases.<\/p>\n\n\n\n<p>For convenience, a dataset model for our test plan can be generate by executing the following command (described in &#8220;<a href=\"https:\/\/yascribe.com\/index.php\/yascribe-client-command-line\/\">yascribe client command line<\/a>&#8220;) :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>java -jar yascribe-jcl.jar --gen-dataset finding-fastest-routes.feature<\/em><\/code><\/pre>\n\n\n\n<p> The  generated dataset model is a <code>.yaml<\/code> file named &#8220;<em>finding-fastest-routes.dataset.xxx.yaml<\/em>&#8221; :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">scribe:<\/mark> \"Finding fastest routes\"\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">scenarios:<\/mark>\n  <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Finding the fastest route to \"London\":<\/mark>\n    <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">variables:<\/mark>\n      <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">London:<\/mark> \"London\"\n      <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Destination:<\/mark> \"Destination\"\n      <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Go:<\/mark> \"Go\"\n      <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Fastest route:<\/mark> \"Fastest route\"\n      <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Found routes:<\/mark> \"Found routes\" <\/em><\/code><\/pre>\n\n\n\n<p>Duplicate the datset model file to two new files :<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><em><em>finding-fastest-routes<\/em>.dataset.1.yaml<\/em><\/li>\n\n\n\n<li><em>finding-fastest-routes.dataset.2.yaml<\/em><\/li>\n<\/ol>\n\n\n\n<p>Modify the second file by replacing :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>&#8220;London&#8221; by &#8220;Rome&#8221;<\/li>\n\n\n\n<li>&#8220;Fastest route&#8221; by &#8220;Shortest route&#8221;<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code><em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">scribe:<\/mark> \"Finding fastest routes\"\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">scenarios:<\/mark>\n  <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Finding the fastest route to \"London\":<\/mark>\n    <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">variables:<\/mark>\n      <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">London:<\/mark> \"Rome\"\n      <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Destination:<\/mark> \"Destination\"\n      <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Go:<\/mark> \"Go\"\n      <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Fastest route:<\/mark> \"Shortest route\"\n      <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">Found routes:<\/mark> \"Found routes\" <\/em><\/code><\/pre>\n\n\n\n<p>Launch the test plan. The test plan will be run in parallel with the two datasets.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dataset testing runs a test plan in parallel with several datasets. For example, we want to run the following test plan (saved in &#8220;finding-fastest-routes.feature&#8221;) in order to test : We will create two datasets for the two cases. For convenience, a dataset model for our test plan can be generate by executing the following command [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-194","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/pages\/194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/comments?post=194"}],"version-history":[{"count":17,"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/pages\/194\/revisions"}],"predecessor-version":[{"id":295,"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/pages\/194\/revisions\/295"}],"wp:attachment":[{"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/media?parent=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}