{"id":22286,"date":"2023-03-27T04:19:49","date_gmt":"2023-03-26T19:19:49","guid":{"rendered":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/801\/?page_id=22286"},"modified":"2023-09-20T18:38:29","modified_gmt":"2023-09-20T09:38:29","slug":"api-bdds","status":"publish","type":"page","link":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/801\/api-manual\/reference\/api-bdds\/","title":{"rendered":"BDD"},"content":{"rendered":"<p>\u30c6\u30b9\u30c8 \u30b1\u30fc\u30b9\u304b\u3089 BDD \u30b7\u30ca\u30ea\u30aa\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u307e\u305f\u306f\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u306b\u306f\u3001\u6b21\u306e API \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<h2>get_bdd<\/h2>\n<p><span style=\"font-weight: 400;\">\u30c6\u30b9\u30c8 \u30b1\u30fc\u30b9\u304b\u3089 BDD \u30b7\u30ca\u30ea\u30aa\u3092 .feature \u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">GET index.php?\/api\/v2\/get_bdd\/{case_id}<\/pre>\n<h3>\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc<\/h3>\n<table class=\"table table--hover\">\n<thead>\n<tr>\n<th>\u540d\u524d<\/th>\n<th>\u30bf\u30a4\u30d7<\/th>\n<th>\u5fc5\u9808<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>case_id<\/td>\n<td>integer<\/td>\n<td>true<\/td>\n<td>\u30c6\u30b9\u30c8 \u30b1\u30fc\u30b9\u306e ID<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u4f8b<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\"># Export the BDD scenario with a case ID of 2133\nGET index.php?\/api\/v2\/get_bdd\/2133<\/pre>\n<h3>\u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u5185\u5bb9<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\">@APP-1\nFeature: Users cannot login with invalid credentials\nThe login page should not allow users to login with invalid credentials, and it should not reveal sensitive info relating to the correctness of credentials.Background:Given I am viewing the login page\n\nScenario Outline: User cannot login with invalid username\nGiven I have entered into the username field\nAnd I have entered into the password field\nWhen I click the login button\nThen I see I am not logged in\nExamples:\n|username|password|\n|invalid1|validP@55w0rd!|\n|invalid2@com|validP@55w0rd!|\n\n\nScenario: User cannot login with invalid password\nGiven I have entered \"myname@valid.com\" into the username field\nAnd I have entered \"invalid\" into the password field\nWhen I click the login button\nThen I see I am not logged in\n\n\nRule: Login responses should not reveal sensitive information\nExamples: Login response should not flag invalid username\nGiven I have entered an invalid username into the username field\nAnd I have entered a valid password into the password field\nWhen I click the login button\nThen I see an error message\nAnd the error message does not state that the username was incorrect\nExamples: Login response should not flag invalid password\nGiven I have entered an invalid password into the password field\nAnd I have entered a valid username into the username field\nWhen I click the login button\nThen I see an error message\nAnd the error message does not state that the password was incorrect<\/pre>\n<h3 id=\"01G68JZ4AMW2EVBMQNCG0SNSJE\">\u30ec\u30b9\u30dd\u30f3\u30b9 \u30b3\u30fc\u30c9<\/h3>\n<table class=\"table table--hover\" style=\"border-collapse: collapse; width: 100%;\">\n<thead>\n<tr>\n<th>\u30b9\u30c6\u30fc\u30bf\u30b9 \u30b3\u30fc\u30c9<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>200<\/td>\n<td>OK<\/td>\n<\/tr>\n<tr>\n<td>400<\/td>\n<td>\u7121\u52b9\u307e\u305f\u306f\u4e0d\u660e\u306a\u30c6\u30b9\u30c8 \u30b1\u30fc\u30b9<\/td>\n<\/tr>\n<tr>\n<td>500<\/td>\n<td>\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"updategroup\">add_bdd<\/h2>\n<p><span style=\"font-weight: 400;\">\u30c6\u30b9\u30c8 \u30b1\u30fc\u30b9\u304b\u3089 BDD \u30b7\u30ca\u30ea\u30aa\u3092 .feature \u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u30a4\u30f3\u30dd\u30fc\u30c8\/\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\">POST index.php?\/api\/v2\/add_bdd\/{section_id}<\/pre>\n<h3>\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc<\/h3>\n<table class=\"table table--hover\">\n<thead>\n<tr>\n<th>\u540d\u524d<\/th>\n<th>\u30bf\u30a4\u30d7<\/th>\n<th>\u5fc5\u9808<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>section_id<\/td>\n<td>integer<\/td>\n<td>true<\/td>\n<td>\u30bb\u30af\u30b7\u30e7\u30f3\u306e ID<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u30ea\u30af\u30a8\u30b9\u30c8\u306e\u4f8b<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\"># Import the BDD scenario with a section ID of 188\nPOST index.php?\/api\/v2\/add_bdd\/188<\/pre>\n<h3>\u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u5185\u5bb9<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\">{\n \"id\": 2136,\n \"title\": \"Users cannot login with invalid credentials\",\n \"section_id\": 188,\n \"template_id\": 4,\n \"type_id\": 7,\n \"priority_id\": 2,\n \"milestone_id\": null,\n \"refs\": \"APP-1\",\n \"created_by\": 1,\n \"created_on\": 1653052591,\n \"updated_by\": 1,\n \"updated_on\": 1653052591,\n \"estimate\": null,\n \"estimate_forecast\": null,\n \"suite_id\": 12,\n \"display_order\": 3,\n \"is_deleted\": 0,\n \"custom_automation_type\": 0,\n \"custom_preconds\": \"The login page should not allow users to login with invalid credentials, and it should not reveal sensitive info relating to the correctness of credentials.Background:Given I am viewing the login page\\n\\t\",\n \"custom_steps\": null,\n \"custom_testrail_bdd_scenario\": \"[{\\\"content\\\":\\\"\\\\tScenario Outline: User cannot login with invalid username\\\\n\\\\tGiven I have entered into the username field\\\\n\\\\tAnd I have entered into the password field\\\\n\\\\tWhen I click the login button\\\\n\\\\tThen I see I am not logged in\\\\n\\\\n\\\\tExamples:\\\\n\\\\t| username  | password    |\\\\n\\\\t| invalid1  | validP@55w0rd! |\\\\n\\\\t| invalid2@com | validP@55w0rd! |\\\"},{\\\"content\\\":\\\"\\\\tScenario: User cannot login with invalid password\\\\n\\\\tGiven I have entered \\\"myname@valid.com\\\" into the username field\\\\n\\\\tAnd I have entered \\\"invalid\\\" into the password field\\\\n\\\\tWhen I click the login button\\\\n\\\\tThen I see I am not logged in\\\"},{\\\"content\\\":\\\"\\\\tExample: Login response should not flag invalid username\\\\n\\\\tGiven I have entered an invalid username into the username field\\\\n\\\\tAnd I have entered a valid password into the password field\\\\n\\\\tWhen I click the login button\\\\n\\\\tThen I see an error message\\\\n\\\\tAnd the error message does not state that the username was incorrect\\\"},{\\\"content\\\":\\\"\\\\tExample: Login response should not flag invalid password\\\\n\\\\tGiven I have entered an invalid password into the password field\\\\n\\\\tAnd I have entered a valid username into the username field\\\\n\\\\tWhen I click the login button\\\\n\\\\tThen I see an error message\\\\n\\\\tAnd the error message does not state that the password was incorrect\\\"}]\",\n \"custom_expected\": null,\n \"custom_steps_separated\": null,\n \"custom_mission\": null,\n \"custom_goals\": null\n}<\/pre>\n<h3 id=\"01G68JZ4AMW2EVBMQNCG0SNSJE\">\u30ec\u30b9\u30dd\u30f3\u30b9 \u30b3\u30fc\u30c9<\/h3>\n<table class=\"table table--hover\" style=\"border-collapse: collapse; width: 100%;\">\n<thead>\n<tr>\n<th>\u30b9\u30c6\u30fc\u30bf\u30b9 \u30b3\u30fc\u30c9<\/th>\n<th>\u8aac\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>200<\/td>\n<td>OK<\/td>\n<\/tr>\n<tr>\n<td>400<\/td>\n<td><span style=\"font-weight: 400;\">\u7121\u52b9\u307e\u305f\u306f\u4e0d\u660e\u306a\u30bb\u30af\u30b7\u30e7\u30f3<\/span><\/td>\n<\/tr>\n<tr>\n<td>403<\/td>\n<td><span style=\"font-weight: 400;\">\u6a29\u9650\u304c\u4e0d\u5341\u5206\u3067\u3059 (\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093)<\/span><\/td>\n<\/tr>\n<tr>\n<td>500<\/td>\n<td>\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u30c6\u30b9\u30c8 \u30b1\u30fc\u30b9\u304b\u3089 BDD \u30b7\u30ca\u30ea\u30aa\u3092\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u307e\u305f\u306f\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u306b\u306f\u3001\u6b21\u306e API \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 get_bdd \u30c6\u30b9\u30c8 \u30b1\u30fc\u30b9\u304b\u3089 BDD \u30b7\u30ca\u30ea\u30aa\u3092 .feature \u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3057\u307e\u3059 [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":6632,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"class_list":["post-22286","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/801\/wp-json\/wp\/v2\/pages\/22286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/801\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/801\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/801\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/801\/wp-json\/wp\/v2\/comments?post=22286"}],"version-history":[{"count":13,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/801\/wp-json\/wp\/v2\/pages\/22286\/revisions"}],"predecessor-version":[{"id":24807,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/801\/wp-json\/wp\/v2\/pages\/22286\/revisions\/24807"}],"up":[{"embeddable":true,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/801\/wp-json\/wp\/v2\/pages\/6632"}],"wp:attachment":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/801\/wp-json\/wp\/v2\/media?parent=22286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}