{"id":182,"date":"2023-09-29T13:32:04","date_gmt":"2023-09-29T13:32:04","guid":{"rendered":"https:\/\/yascribe.com\/?page_id=182"},"modified":"2023-09-29T13:34:57","modified_gmt":"2023-09-29T13:34:57","slug":"self-learning","status":"publish","type":"page","link":"https:\/\/yascribe.com\/index.php\/self-learning\/","title":{"rendered":"Self-learning"},"content":{"rendered":"\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p>Self-learning is a mechanism that yascribe utilizes to automate scenarios in templates. That makes scenarios reusable by other scenarios.<\/p>\n\n\n\n<p>For example :<\/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\">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> 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>In this example, the first step of the second scenario is a call to the first scenario in order to find routes to &#8220;London&#8221; (instead of &#8220;Paris&#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\">When <\/mark>I find routes to \"London\"<\/em><\/code><\/pre>\n\n\n\n<p>This second scenario is equivalent to : <\/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\">  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><em>I enter \"London\" into \"Destination\"<\/em><\/em>\n    <em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">And <\/mark>I click on \"Go\"\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<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>Do not run a templated scenario<\/strong><\/p>\n\n\n\n<p>When executing the previous test plan, the two scenarios are run. To not run the first scenario (<em>Finding routes to &#8220;Paris&#8221;<\/em>) but only calls of its template in other scenarios, just tag the scenario with the keyword <code>'no run'<\/code> :  <\/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\">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<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>Making libraries of scenario<\/strong>s<\/p>\n\n\n\n<p>To create a library of scenarios, create <code>Features <\/code>that contain the scenarios. Then push the <code>Feature<\/code> files to the library folder on the server.<\/p>\n\n\n\n<p>To use the library in test plans, just set the library in the settings of the test project. <\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Self-learning is a mechanism that yascribe utilizes to automate scenarios in templates. That makes scenarios reusable by other scenarios. For example : In this example, the first step of the second scenario is a call to the first scenario in order to find routes to &#8220;London&#8221; (instead of &#8220;Paris&#8221;) : This second scenario is equivalent [&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-182","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/pages\/182","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=182"}],"version-history":[{"count":10,"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/pages\/182\/revisions"}],"predecessor-version":[{"id":193,"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/pages\/182\/revisions\/193"}],"wp:attachment":[{"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/media?parent=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}