* chore: set up instrumentation and instrument middleware * chore: set up console exporter * chore: add parent span option to telemetry package * chore: set up telemetry verbose mode * chore: instrument the network proxy - part 1 * chore: make sure to terminate spans when request is aborted * fix telemetry, create/end the request middle prior to sending the outbound request * avoid telemetry ts build step, create entrypoint into packages/telemetry using TS conventions * allow env vars to be "true" or "1" * when creating child span, inherit their attributes directly from the parent * create custom honeycomb exporter and span processor to log traces * remove duplicate code that's already called in this.setRootContext * cleanup * more clean up * update honeycomb network:proxy attributes, update console.log message * yarn lock * chore: remove performance API in middleware * chore: end response on correct event * recursively gather parent attributes on close * added key and some clean up * github action detector, move verbose into index, verbose log commands * some tests * clean up honeycomb exporter * some renaming * testing console trace link exporter * Don't lose the top span when running in verbose. * link to the right place for prod/dev * changes to verbose to make sure it is read in the browser * Apply suggestions from code review * pass parent attributes between telemetry instances * default to false * 'fix' build issues * src not dist * add back on start span * once more with feeling * Fix some tests * try this i guess * revert auto build * Apply suggestions from code review Co-authored-by: Bill Glesias <bglesias@gmail.com> * support failed commands * Address PR comments * Address PR Comments * error handling * handle all the errors --------- Co-authored-by: Bill Glesias <bglesias@gmail.com> Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Driver
This is the core JavaScript library that is loaded inside the browser that is responsible for executing Cypress commands and managing the test runtime.
Building
The driver is actually consumed by the runner like any other npm module. To develop the driver and see changes reflected you need to run the watch task inside of the runner.
yarn workspace @packages/runner watch
Developing
If you're developing on the driver, you'll want to run in the normal Cypress GUI mode, like you would when you're writing tests for your own Cypress projects.
yarn workspace @packages/driver cypress:open
Read the runner's README.md for more information.
Running
You can also run all of the driver's tests locally. We don't really recommend this because it takes a long time, and we have this process optimized by load balancing the tests across multiple workers in CI.
It's usually easier to run the tests in the GUI, commit, and then see if anything broke elsewhere.
# in separate terminal
yarn workspace @packages/driver cypress:run
# or for development
yarn workspace @packages/driver cypress:open
Debug Logs
The debug module is used to generate debug logs for the driver. In the browser, you can enable driver debug logs by setting localStorage.debug in the console:
localStorage.debug = "cypress:driver,cypress:driver:*"
Note: you may need to enable "Verbose" or "Debug" log levels inside the browser's developer tools, since not all browsers display debug logs by default.
Patches
sinonunfetchto polyfillfetch. Added constructor function to point XMLHttpRequest to the application under test window.
Note: when creating a patch, make sure there is no package-lock.json file! Also rename the patch to have ".dev.patch" extension.
Cross-origin Testing
Working on cross-origin testing or reviewing a PR related to it? Check out the Cross-origin Testing Technical Overview.