{"id":281,"date":"2023-10-19T06:43:05","date_gmt":"2023-10-19T06:43:05","guid":{"rendered":"https:\/\/yascribe.com\/?page_id=281"},"modified":"2023-10-27T15:42:37","modified_gmt":"2023-10-27T15:42:37","slug":"yascribe-client-command-line","status":"publish","type":"page","link":"https:\/\/yascribe.com\/index.php\/yascribe-client-command-line\/","title":{"rendered":"yascribe client command line"},"content":{"rendered":"\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p>The yascribe client can be executed from a command line to run test plans and to generate dataset models.<\/p>\n\n\n\n<p><strong><em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">To try it out, use the evaluation server :<\/mark><\/em><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">eval.yascribe.com<\/mark><\/em><\/strong><\/li>\n\n\n\n<li><strong><em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">9090<\/mark><\/em><\/strong><\/li>\n<\/ul>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\"><em>Only Chrome and Firefox are available on the evaluation s<\/em><\/mark><em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">erver.<\/mark><\/em><\/p>\n\n\n\n<p>Scenario examples are available in the <a href=\"https:\/\/github.com\/yascribe\/yascribe-jcl-demo\/tree\/main\/yascribe\/scribes\">Github demo project<\/a>.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>Java 17 or higher is required<\/strong><\/p>\n\n\n\n<p>Please, install Java 17 or higher in your environment.<\/p>\n\n\n\n<p>You can download <a href=\"http:\/\/oracle.com\/java\/technologies\/downloads\/\">Oracle JDK here<\/a>.<\/p>\n\n\n\n<p><a href=\"https:\/\/openjdk.org\/\">Open JDKs<\/a> are also available. <\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>Creating a project<\/strong><\/p>\n\n\n\n<p>Create a project folder where test plans will be saved.<\/p>\n\n\n\n<p> Then download and unzip the <code>yascribe-jcl.jar<\/code> file into the project folder : <\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-7e1621d1-f639-428a-a741-90f56ac9b543\" href=\"https:\/\/yascribe.com\/wp-content\/uploads\/2023\/10\/yascribe-jcl.zip\">yascribe-jcl<\/a><a href=\"https:\/\/yascribe.com\/wp-content\/uploads\/2023\/10\/yascribe-jcl.zip\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-7e1621d1-f639-428a-a741-90f56ac9b543\">Download<\/a><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>Configuring the test environment<\/strong><\/p>\n\n\n\n<p>Create the <code>yascribe.config.properties<\/code> file at the root of the project folder :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-secondary-color\"><em>## Scribe server configuration\n# the server name<\/em><\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.yascribe.server.name<\/mark>=localhost\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-secondary-color\"><em># the server port<\/em><\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">ya<\/mark>scribe.server.port<\/mark>=9090\n\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-secondary-color\"><em>## Project configuration\n# Project directory<\/em><\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">ya<\/mark>scribe.project.dir<\/mark>=.\/\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-secondary-color\"><em># Scribe directory<\/em><\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">ya<\/mark>scribe.project.scribeDir<\/mark>=yascribe\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-secondary-color\"><em># Report directory<\/em><\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">ya<\/mark>scribe.project.reportDir<\/mark>=yascribe\/reports\n\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-secondary-color\"><em>## Test configuration\n# Browser name: Chrome, Firefox, Edge, for example<\/em><\/mark>\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">ya<\/mark>scribe.browser.name<\/mark>=Chrome\n# Browser width\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.yascribe.browser.width<\/mark>=1280\n# Browser height\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.yascribe.browser.height<\/mark>=1080\n# Browser language : if empty or not specified then the default language is used\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.yascribe.browser.language<\/mark>=en\n# Taking a screenshot on test failure : true or false\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.yascribe.screenshotOnFailure<\/mark>=false<\/code><\/pre>\n<\/div>\n\n\n\n<p>Replace <code>localhost <\/code>and <code>9090 <\/code>by your yascribe server name and port. <\/p>\n\n\n\n<p><strong><em>To try yascribe out, use the evaluation server :<\/em><\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>eval.yascribe.com<\/em><\/strong><\/li>\n\n\n\n<li><strong><em>9090<\/em><\/strong><\/li>\n<\/ul>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">ya<\/mark>scribe.project.scribeDir<\/mark> is the folder where test plans (<code>.feature<\/code> files) are stored. The default subfolder <em>yascribe <\/em>can be replaced by another folder.<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">ya<\/mark>scribe.project.reportDir<\/mark> is the folder where test reports will be generated in two formats : <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>json<\/li>\n\n\n\n<li>markdown<\/li>\n<\/ul>\n\n\n\n<p>The default subfolder <em>yascribe\/reports <\/em>can be replaced by another folder.<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">ya<\/mark>scribe.browser.name<\/mark> : specify one or several browsers to run tests. In the case of multi-browsers, use a `,` as separator character. If using the evaluation server then only Chrome, Firefox and Edge are available.<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.yascribe.browser.width<\/mark>, <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.yascribe.browser.height <\/mark>, <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.yascribe.browser.language<\/mark> and <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.yascribe.screenshotOnFailure<\/mark> are optional. If they are not specified then default values will be used. <\/p>\n\n\n\n<p><em>When <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.yascribe.screenshotOnFailure<\/mark> is set to <code>true<\/code>, the report files may be large.<\/em><\/p>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>Running tests from a command line<\/strong><\/p>\n\n\n\n<p>To run all test plans of the project, execute the following command :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code><em>java -jar yascribe-jcl.jar<\/em><\/code><\/code><\/pre>\n\n\n\n<p>To run some specific test plans of the project, execute the following command :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code><em>java -jar yascribe-jcl.jar <span style=\"background-color: initial; color: var(--wp--preset--color--foreground); font-family: inherit; font-size: inherit;\">--scribes test-plan-2.feature test-plan-4.feature<\/span><\/em><\/code><\/code><\/pre>\n\n\n\n<p>Reports are generated in <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">com.<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-primary-color\">ya<\/mark>scribe.project.reportDir<\/mark>.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>Generating dataset models<\/strong><\/p>\n\n\n\n<p>To generate dataset models from a command line, use the<code> --gen-dataset <\/code>option.<\/p>\n\n\n\n<p>To generate dataset models of all test plans : <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>java -jar yascribe-jcl.jar --gen-dataset<\/em><\/code><\/pre>\n\n\n\n<p>To generate dataset models of some test plans :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>java -jar yascribe-jcl.jar --gen-dataset test-plan-2.feature test-plan-4.feature<\/em><\/code><\/pre>\n<\/div>\n\n\n\n<p>The generated dataset models are <code>.yaml<\/code> files. For example &#8220;<em>test-plan-4.dataset.xxx.yaml<\/em>&#8221; is the dataset model of <em>test-plan-4.feature<\/em> and it is saved in the folder of <em>test-plan-4.feature<\/em>.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The yascribe client can be executed from a command line to run test plans and to generate dataset models. To try it out, use the evaluation server : Only Chrome and Firefox are available on the evaluation server. Scenario examples are available in the Github demo project. Java 17 or higher is required Please, install [&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-281","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/pages\/281","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=281"}],"version-history":[{"count":9,"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/pages\/281\/revisions"}],"predecessor-version":[{"id":314,"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/pages\/281\/revisions\/314"}],"wp:attachment":[{"href":"https:\/\/yascribe.com\/index.php\/wp-json\/wp\/v2\/media?parent=281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}