|
| 1 | +# Installation instructions for Ubuntu |
| 2 | + |
| 3 | +The following instructions are for installing the pre-requisites to automatically run your codeception tests whenever a file is changed, in the "watched" folders on your server. |
| 4 | + |
| 5 | +There are some troubleshooting steps at the bottom of this file. |
| 6 | + |
| 7 | +If you're using an older version of Ubuntu, you may need to update: |
| 8 | + |
| 9 | +sudo apt-get update -y && sudo apt-get upgrade -y |
| 10 | + |
| 11 | +Run the above if you experience any strange 404 ip not found errors when carrying out the following: |
| 12 | + |
| 13 | +* sudo apt-get install nodejs |
| 14 | +* sudo apt-get install npm |
| 15 | +* sudo npm install -g grunt-cli |
| 16 | +* copy package.json to your web / project root folder |
| 17 | +* copy gruntfile.js to your web / project root folder |
| 18 | +* from your web / project root folder, run: |
| 19 | + * sudo npm install |
| 20 | + |
| 21 | +To start, run: |
| 22 | + |
| 23 | +grunt watch |
| 24 | + |
| 25 | +See below if this throws an error. |
| 26 | + |
| 27 | +This will take over your console session until you cancel (ctrl+c). |
| 28 | + |
| 29 | +Now, whenever a file in a 'watched' folder (anything in 'tests/unit/*' by default) changes, the codeception unit tests will re-run automatically. |
| 30 | + |
| 31 | +Feel free to edit, change, hack to your hearts content. |
| 32 | + |
| 33 | + |
| 34 | +## Troubleshooting |
| 35 | + |
| 36 | +### FIX - /usr/bin/env: node: No such file or directory |
| 37 | + |
| 38 | +Do one of the following: |
| 39 | + |
| 40 | +sudo apt-get install nodejs-legacy |
| 41 | + |
| 42 | +or |
| 43 | + |
| 44 | +sudo ln -s /usr/bin/nodejs /usr/bin/node |
| 45 | + |
| 46 | + |
| 47 | +### Strange 404 ip not found errors during 'sudo apt-get install npm' |
| 48 | + |
| 49 | +Likely your installation of Ubuntu is old. |
| 50 | + |
| 51 | +Re-run: sudo apt-get update -y && sudo apt-get upgrade -y |
0 commit comments