This is a high level browser automated program for monitoring DSLogon for uptime.
-
Instructions to install NodeJS version manager, nvm.
-
Install nodejs version 8 or above by running:
nvm install 8
ornvm install 10
nvm use 8
ornvm use 10
.
-
Git clone the code:
git clone git@github.com:fartbagxp/monitor-dslogon.git
. -
Install all third party libraries:
npm install
.- This includes a headless Chrome browser for Puppeteer.
-
Copy
.env.sample
to.env
:cp .env.sample .env
. -
Fill out the environment variables in the
.env
file.
I use vs-code with a prettier extension.
Puppeteer is a NodeJS library which provides a high level API to automate Google Chrome. By simulating Chrome, we have the full ability of viewing a particular user's experience when logging in.
# Simple Test run with screenshots saved to debug folder.
npm run start-dev
# Simulate a production run
npm start
# Running tests
npm test
-
We take screenshots and validate the HTML provided to ensure that end users experience are what we expect them to be.
- You can try this by running
npm run start-dev
, and the resulting screenshot and HTML will appear in thedebug
folder.
- You can try this by running
-
We also verify the HTML for correctness, by verifying certain key terms such as
logged in
, to verify that the user has been logged in properly. -
We should verify that all HTTP request calls were completely properly, and that no error was captured in the Chrome console.
- Password failure, need to check all HTTPS error codes for various submission requests.
- Connection Reset on DSLogon page. Will end at 6.
- Outage means redirection from ID.me will hang forever at 6. From going directly through DSLogon, it'll give you a 500 http status code.
- 60 login time through DSLogon is around the right time.
- Error 60 gives back 200 HTTP status code.