Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Browser Tests

Andrew Stanton-Nurse edited this page May 21, 2018 · 2 revisions

Running from the command line

The SignalR Browser Functional Tests can be run from the command-line by launching a headless instance of Google Chrome. If you don't have Google Chrome installed, you'll need to use the other method (see "Running from a browser"). The command-line run will simply fail.

  1. ./build.cmd /t:Restore (on Windows) or ./build.sh /t:Restore (on Linux/macOS) (to restore packages in all of the subdirectories of client-ts; as long as you haven't changed the dependencies you don't need to re-run this)
  2. cd clients\ts
  3. npm run build (to build both @aspnet/signalr and @aspnet/signalr-protocol-msgpack, obviously needs to be re-run any time you change the NPM modules)
  4. cd FunctionalTests
  5. npm test

Running from a browser

  1. cd clients\ts
  2. npm run build (to build both @aspnet/signalr and @aspnet/signalr-protocol-msgpack, obviously needs to be re-run any time you change the NPM modules)
  3. cd FunctionalTests
  4. npm run build
  5. dotnet run
  6. Open any browser to the URL specified in standard output to run the tests in that browser.

Debugging a test

Usually it's easiest to run the test from the browser to debug it. If you get any failures, you can click the test name and it will change the URL to one that runs only that test. Then you can use the Browser Dev Tools to debug the test.

Clone this wiki locally