{"id":677,"date":"2019-03-04T15:06:15","date_gmt":"2019-03-04T06:06:15","guid":{"rendered":"https:\/\/ito-u-oti.com\/?p=677"},"modified":"2019-03-04T15:06:15","modified_gmt":"2019-03-04T06:06:15","slug":"post-677","status":"publish","type":"post","link":"https:\/\/ito-u-oti.com\/?p=677","title":{"rendered":"\u3010Nightwatch.js\u3011nightwatch.json\u3068nightwatch.conf.js\u306e\u8a18\u8ff0\u6bd4\u8f03"},"content":{"rendered":"<h2 id=\"outline__1\">nightwatch.json\u3068nightwatch.conf.js\u306e\u8a18\u8ff0\u6bd4\u8f03<\/h2>\n<p>\u516c\u5f0f\u3082Web\u4e0a\u306e\u8a18\u4e8b\u3067\u3082\u300cnightwatch.json\u306fnightwatch.conf.js\u3067\u3082\u66f8\u3051\u308b\u3088\uff01nightwatch.conf.js\u306e\u65b9\u304cjavascript\u30d9\u30fc\u30b9\u3067\u66f8\u3051\u308b\u304b\u3089\u898b\u3084\u3059\u304f\u306a\u308b\u3088\uff01\u300d\u3063\u3066\u66f8\u3044\u3066\u3042\u3063\u3066\u3082\u3001<br \/>\n\u5b9f\u969b\u306e\u4e2d\u8eab\u306b\u3064\u3044\u3066\u3069\u3093\u306a\u98a8\u306b\u66f8\u3051\u3070\u3044\u3044\u306e\u304b\u304c\u30a4\u30de\u30a4\u30c1\u308f\u304b\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002<\/p>\n<h2 id=\"outline__2\">\u8aad\u307f\u8fbc\u307f\u306e\u6d41\u308c<\/h2>\n<p>\u5f53\u305f\u308a\u524d\u306e\u3053\u3068\u3060\u3051\u3069\u4e00\u5fdc\u3002<br \/>\nnightwatch\u3092\u8d77\u52d5\u3057\u305f\u3068\u304d\u306b\u3001\u8aad\u307f\u8fbc\u307e\u308c\u308bconfig\u306e\u6d41\u308c\u306f3\u30d1\u30bf\u30fc\u30f3\u3042\u308b\u3002<\/p>\n<h3 id=\"outline__2_1\">nightwatch.json\u306e\u307f<\/h3>\n<p>nightwatch.json\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b<\/p>\n<h3 id=\"outline__2_2\">nightwatch.conf.js\u306e\u307f<\/h3>\n<p>nightwatch.conf.js\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b<\/p>\n<h3 id=\"outline__2_3\">nightwatch.json\u3068nightwatch.conf.js\u304c\u5171\u5b58<\/h3>\n<p>nightwatch.conf.js\u304c\u512a\u5148\u3055\u308c\u3066\u8aad\u307f\u8fbc\u307e\u308c\u308b\u3002<br \/>\nnightwatch.conf.js\u304b\u3089nightwatch.json\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nmodule.exports = (function(settings) {\r\n  settings.test_workers = false;\r\n  return settings;\r\n})(require('.\/nightwatch.json'));\r\n<\/pre>\n<p>\u3053\u308c\u306f<a href=\"http:\/\/nightwatchjs.org\/gettingstarted\">\u516c\u5f0f<\/a>\u306b\u66f8\u3044\u3066\u3042\u308b\u3002<\/p>\n<h2 id=\"outline__3\">nightwatch.json<\/h2>\n<p>\u30b7\u30f3\u30d7\u30eb\u306a\u8a2d\u5b9a\u306ejson\u3092\u4f5c\u6210\u3057\u305f\u3002<br \/>\nchromedriver\u306e\u307f\u3092\u4f7f\u7528\u3057\u3066chrome\u306btests\u914d\u4e0b\u306e\u30bd\u30fc\u30b9\u3092\u5b9f\u884c\u3055\u305b\u308b\u8a2d\u5b9a\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n{\r\n\t&quot;src_folders&quot;: &#x5B;\r\n\t\t&quot;tests&quot;\r\n\t],\r\n\t&quot;output_folder&quot;: &quot;reports&quot;,\r\n\t&quot;webdriver&quot;: {\r\n\t\t&quot;start_process&quot;: true,\r\n\t\t&quot;server_path&quot;: &quot;.\/lib\/chromedriver_2.45&quot;,\r\n\t\t&quot;cli_args&quot;: &#x5B;\r\n\t\t\t&quot;--verbose&quot;\r\n\t\t],\r\n\t\t&quot;port&quot;: 9515\r\n\t},\r\n\t&quot;test_settings&quot;: {\r\n\t\t&quot;default&quot;: {\r\n\t\t\t&quot;desiredCapabilities&quot;: {\r\n\t\t\t\t&quot;browserName&quot;: &quot;chrome&quot;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\n<h2 id=\"outline__4\">nightwatch.conf.js<\/h2>\n<p>\u3053\u3061\u3089\u304cnightwatch.json\u3092\u7f6e\u304d\u63db\u3048\u305f\u3042\u3068\u3002<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nvar webdriverManagerPath = '.\/lib\/';\r\n\r\nvar DRIVERENV = {\r\n  start_process: true,\r\n  server_path: webdriverManagerPath + 'chromedriver_2.45',\r\n  port: 9515,\r\n  cli_args: &quot;--verbose&quot;\r\n};\r\n\r\nvar CHROME_CONFIGURATION = {\r\n  browserName: 'chrome'\r\n};\r\n\r\nvar DEFAULT_CONFIGURATION = {\r\n  desiredCapabilities: CHROME_CONFIGURATION\r\n};\r\n\r\nvar TESTENV = {\r\n  default: DEFAULT_CONFIGURATION\r\n};\r\n\r\nmodule.exports = {\r\n  src_folders: &#x5B;'tests'],\r\n  output_folder: 'reports',\r\n  webdriver: DRIVERENV,\r\n  test_settings: TESTENV\r\n};\r\n<\/pre>\n<h2 id=\"outline__5\">\u307e\u3068\u3081<\/h2>\n<p>nightwatch.conf.js\u306e\u65b9\u304c\u3001\u500b\u5225\u306e\u8a2d\u5b9a\u3054\u3068\u306b\u307e\u3068\u3081\u3089\u308c\u3066\u5f8c\u3005\u306e\u30e1\u30f3\u30c6\u304c\u697d\u3060\u306a\u3068\u611f\u3058\u305f\u3002<br \/>\n\u3042\u3068js\u306a\u306e\u3067\u62e1\u5f35\u3057\u3066\u3044\u308d\u3044\u308d\u3067\u304d\u305d\u3046\u3002\u56fa\u5b9a\u5024\u3092\u5225\u30d5\u30a1\u30a4\u30eb\u306b\u5916\u51fa\u3057\u3059\u308b\u3068\u304b\u3002<br \/>\n\u4e00\u65b9\u3067\u3001nightwatch.json\u3082\u3053\u308c\u306f\u3053\u308c\u3067\u3071\u3063\u3068\u898b\u3067\u3069\u3053\u304c\u3069\u306e\u8a2d\u5b9a\u306b\u7d10\u3065\u3044\u3066\u3044\u308b\u306e\u304b\u3068\u3044\u3046\u306e\u304c\u308f\u304b\u3063\u3066\u826f\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3002<br \/>\n\u3051\u3069json\u306e\u5834\u5408\u306f\u300c,\u300d\u3084\u300c}\u300d\u304c\u306a\u3044\u3068\u3059\u3050\u306b\u6012\u3089\u308c\u3066\u3069\u3053\u304c\u8db3\u308a\u306a\u3044\u306e\u304b\u63a2\u3059\u624b\u9593\u304c\u3042\u308b\u306e\u3067\u3061\u3087\u3063\u3068\u5384\u4ecb\u304b\u3082\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>nightwatch.json\u3068nightwatch.conf.js\u306e\u8a18\u8ff0\u6bd4\u8f03 \u516c\u5f0f\u3082Web\u4e0a\u306e\u8a18\u4e8b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":717,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[168],"tags":[172,171,169],"class_list":["post-677","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nightwatch-js","tag-conf","tag-json","tag-nightwatch-js"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/posts\/677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=677"}],"version-history":[{"count":3,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/posts\/677\/revisions"}],"predecessor-version":[{"id":739,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/posts\/677\/revisions\/739"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=\/wp\/v2\/media\/717"}],"wp:attachment":[{"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ito-u-oti.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}