Browse Source

Update nightwatch (#76)

Updates version for nightwatch, selenium-server, and chromedriver. Updates test script to explicitly start selenium-server through a jar file.
BentleyJOakes 6 years ago
parent
commit
c0de6acd72
4 changed files with 476 additions and 410 deletions
  1. 3 4
      nightwatch.conf.js
  2. 455 399
      package-lock.json
  3. 4 4
      package.json
  4. 14 3
      run_tests.sh

+ 3 - 4
nightwatch.conf.js

@@ -3,9 +3,8 @@
 *  See COPYING, COPYING.lesser, and README.md for full details
 */
 
-const seleniumServer = require("selenium-server");
 const chromedriver = require("chromedriver");
-
+const selenium_server = require("selenium-server");
 
 
 module.exports = {
@@ -17,8 +16,8 @@ module.exports = {
   "globals_path" : "",
 
   "selenium" : {
-    "start_process" : true,
-    "server_path" : seleniumServer.path,
+    "start_process" : false,
+    "server_path" : selenium_server.path,
     "log_path" : "",
     "port" : 4444,
     "cli_args" : {

File diff suppressed because it is too large
+ 455 - 399
package-lock.json


+ 4 - 4
package.json

@@ -16,10 +16,10 @@
     "socket.io-client": "^0.9.16"
   },
   "devDependencies": {
-    "chromedriver": "^2.43.1",
-    "glob": "^7.1.2",
-    "nightwatch": "^0.9.21",
-    "selenium-server": "^3.13.0"
+    "chromedriver": "^2.46.0",
+    "glob": "^7.1.4",
+    "nightwatch": "^1.1.13",
+    "selenium-server": "3.141.59"
   },
   "scripts": {
     "test": "./run_tests.sh"

+ 14 - 3
run_tests.sh

@@ -29,15 +29,26 @@ if ! kill -0 "$mtpid"; then
     exit $mt_status
 fi
 
-echo "Starting tests..."
+echo "Starting Selenium server."
+java -jar "./node_modules/selenium-server/lib/runner/selenium-server-standalone-3.141.59.jar" &
+seleniumpid=$!
+sleep 3
+
+#check if model transformer is dead
+if ! kill -0 "$seleniumpid"; then
+    wait seleniumpid
+    se_status=$?
+    exit $se_status
+fi
 
-#start nightwatch tests
-nightwatch
 
+echo "Starting tests..."
+nightwatch
 
 echo "Stopping server and mt script..."
 kill "$serverpid"
 kill "$mtpid"
+kill "$seleniumpid"