This repository contains a set of frontend apps to test with.
Make sure you have have a working local Node.js install. The
Node.js version should match the one in the .tool-versions file.
The yarn package manager should be globally installed:
npm i -g yarn
Install the dependencies with bundle:
bundle install
Get started by adding a push and frontend key:
cp keys.example.yml keys.yml
Open this file and follow the instructions.
To install an app:
rake app:install app=angular/13
rake app:install app=angular/14
rake app:install app=react/cra-16
rake app:install app=react/cra-17
rake app:install app=react/cra-17-typescript
rake app:install app=react/cra-18
rake app:install app=react/vite-18
rake app:install app=stimulus/3
rake app:install app=vue/2
rake app:install app=vue/3
rake app:install app=vue/3-class-component
To run an app and upload its sourcemaps:
rake app:run app=angular/13 revision=<revision>
rake app:run app=angular/14 revision=<revision>
rake app:run app=react/cra-16 revision=<revision>
rake app:run app=react/cra-17 revision=<revision>
rake app:run app=react/cra-17-typescript revision=<revision>
rake app:run app=react/cra-18 revision=<revision>
rake app:run app=react/vite-18 revision=<revision>
rake app:run app=stimulus/3 revision=<revision>
rake app:run app=vue/2 revision=<revision>
rake app:run app=vue/3 revision=<revision>
rake app:run app=vue/3-class-component revision=<revision>
Then navigate to http://localhost:5001 to trigger an error.
To run the tests, you must have geckodriver installed:
brew install geckodriver
To run an integration test on all test setups:
bundle exec rspec
You can add a new test app in one of the framework directories. Add this
line to import a configured Appsignal instance:
import appsignal from "./appsignal.js"Make sure to use wildcard dependencies in package.json. Specify the
major version of the framework you're using, for example =2 or =3.
For the tests to pass a test app should throw a JS error on /:
throw new Error("This is an error")This error should be caught by the app, the app should render the following text:
An error was thrown
To do local testing checkout the integrations somewhere, and run mono bootstrap in the directory. Then run:
rake link
This will link the local packages into all the test setups.
Whenever you make changes to the integrations run mono build. If this is
done running apps works in the usual manner.
To undo this step and unlink the packages run:
rake unlink