Giter Site home page Giter Site logo

sorry-cypress / sorry-cypress Goto Github PK

View Code? Open in Web Editor NEW
2.6K 2.6K 293.0 5.99 MB

Open-source, free, self-hosted alternative to Cypress Dashboard

Home Page: https://sorry-cypress.dev

License: MIT License

JavaScript 1.95% Dockerfile 0.70% TypeScript 96.20% Shell 0.96% EJS 0.17% Procfile 0.01%
cypress cypress-dashboard cypress-io cypress-tests dashboard e2e-tests hacktoberfest javascript-tests parallel parallelization

sorry-cypress's Introduction

Update Dockerhub Images Update Dockerhub Images Join slack VScodespaces

banner dark

Open-source, free drop-in replacement for Cypress Dashboard

https://sorry-cypress.dev | https://currents.dev

Sorry Cypress is open-source, free alternative to Cypress Dashboard that unlocks unlimited parallelization, test recordings, integration with GitHub, Slack and more.

Currents.dev - is an enhanced version of Sorry Cypress. It is a managed cloud service that hundreds of companies around the globe use to run millions of Cypress tests without breaking the bank. It offers a better security, performance, analytics, integrations and support.

Table of contents

Features

  • run cypress tests in parallel with no limitations
  • upload screenshots and videos to your own storage
  • browse test results, screenshots and video recordings
  • see all your projects test results in one page
  • self-hosted - use your own infrastructure, own your data
  • integrate with GitHub, Slack or anything else via webhooks
  • works on popular cloud platforms and your data center:
    • Docker images
    • Docker compose files
    • Kubernetes Helm Charts
    • AWS
    • Heroku
    • Google Cloud
    • Azure

Quickstart

It takes just 5 minutes to setup sorry-cypress πŸš€

Follow our Guide.

FAQ

Is it production-ready?

Yes. Have been used by dozens of companies of different sizes around the globe.

I need help, what do I do?

Thanks, here are our Support Options

I want to help, how?

Awesome, head to Contribution Options

Changelog

Changelog

Developers

The easiest way to start contributing is using GitHub Codespaces

License

MIT

Donate

Contributors

Thanks goes to these wonderful people (emoji key):

Jeff Hicken
Jeff Hicken

πŸ’» πŸ€”
Janine
Janine

πŸ’» πŸ“–
Meet Shah
Meet Shah

πŸ’» πŸ“–
Abhi D
Abhi D

πŸ’»
TomaszG
TomaszG

πŸ’» πŸ“–
Corey Shirk
Corey Shirk

πŸ“–
nickcox
nickcox

πŸ“–
MeStrak
MeStrak

πŸ“– πŸ’»
mlsad3
mlsad3

πŸ“– πŸ’»
Kyle Then
Kyle Then

πŸ“–
Henry Ruhs
Henry Ruhs

πŸ€”
Aditya Trivedi
Aditya Trivedi

πŸ–‹
Stefan Schulte-Ortbeck
Stefan Schulte-Ortbeck

πŸ’» πŸ’‘ πŸ“– πŸ€”
Tim Collins
Tim Collins

πŸ–‹ πŸ’‘
Bram Plessers
Bram Plessers

πŸ’»
Nils Martel
Nils Martel

πŸ“–
dlavrenuek
dlavrenuek

πŸ’»
Kacper
Kacper

πŸ’» πŸ“–
Denis
Denis

πŸ’»
Lucas Tinoco
Lucas Tinoco

πŸ“–
JuanJose Perez
JuanJose Perez

πŸ’»
Sven Linstaedt
Sven Linstaedt

πŸ’» πŸš‡
Fernando Maia
Fernando Maia

πŸ’»
Peter Beckham
Peter Beckham

πŸ’»
Mathieu Paquette
Mathieu Paquette

πŸ’» πŸ“–
Anish Kargaonkar
Anish Kargaonkar

πŸ’»
Bart Riepe
Bart Riepe

πŸ’»
Iman Mahmoudinasab
Iman Mahmoudinasab

πŸ’»
Jovan Ilić
Jovan Ilić

πŸ’»
Scott
Scott

πŸ’»
Karim Ould Mahieddine
Karim Ould Mahieddine

πŸ’»
pitthecat
pitthecat

πŸš‡
Dmitriy Loshakov
Dmitriy Loshakov

πŸ’»
Edouard Benauw
Edouard Benauw

πŸ’»
joaoduartepinto
joaoduartepinto

πŸ’»
Alyssa
Alyssa

πŸ’»
Bjartur Þórhallsson
Bjartur Þórhallsson

πŸ’»
Matteo Vivona
Matteo Vivona

πŸ’»
Rich Rauenzahn
Rich Rauenzahn

πŸ’»
Niclas Mietz
Niclas Mietz

πŸš‡
Martin Parsiegla
Martin Parsiegla

πŸ’»
Amit Oren
Amit Oren

πŸ’»
Blake R
Blake R

πŸ’»
NicolΓ‘s
NicolΓ‘s

πŸ’»
Pavlos-Petros Tournaris
Pavlos-Petros Tournaris

πŸ’»
Mauricio Villalobos
Mauricio Villalobos

πŸ’» πŸ“–
crux-capacitor
crux-capacitor

πŸš‡ πŸ“–
samixchoumi
samixchoumi

πŸ’»
Erik Martino
Erik Martino

πŸ’»
Roman
Roman

πŸ’»
EstefanΓ­a Fdez
EstefanΓ­a Fdez

πŸ’»
DavidFontalba
DavidFontalba

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

sorry-cypress's People

Contributors

aeolun avatar agoldis avatar allcontributors[bot] avatar amit-o avatar blakeromano avatar boxofcrates avatar coreyshirk avatar denidoman avatar dependabot[bot] avatar dlavrenuek avatar estefafdez avatar fsmaia avatar imanmahmoudinasab avatar janineahn avatar jhicken avatar joaoduartepinto avatar karimould avatar mathpaquette avatar matrunchyk avatar matteovivona avatar nilsmartel avatar roemer avatar samixchoumi avatar snyk-bot avatar solidnerd avatar spea avatar stefans-o avatar tico24 avatar tim-sendible avatar xtroncode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sorry-cypress's Issues

Add demo

Add demo to showcase what are the capabilities of this project

Restricted access

I imagine some users would like to restrict access to the dashboard components for foreigners.

[K8S] director failed connect to mongo after pod re-deploy

Running sorry-cypress in k8s with ArgoCD. Simply used provided docker-compose .yaml file to generate k8s deployment manifests. mongo deployed as a pod (not a good practice tho, will move to aws rds once figure this out). Hence with K8S pods are destroyed and re-created from time to time which caused an issue for director service to connect.

After re-deploy Cypress throws error while trying to run the test:

We encountered an unexpected error talking to our servers.

We will retry 3 more times in 30 seconds...

The server's response was:

RequestError: Error: socket hang up
We encountered an unexpected error talking to our servers.

We will retry 2 more times in 1 minute...

And director pod throws exception:

>> Machine is asking to join a run { recordKey: 'xxx', ciBuildId: 'Local Build: 01' }
>> Machine is joining a run { ciBuildId: 'Local Build: 01' }
(node:27) UnhandledPromiseRejectionWarning: MongoError: server instance pool was destroyed
    at basicWriteValidations (/app/node_modules/mongodb/lib/core/topologies/server.js:574:41)
    at Server.insert (/app/node_modules/mongodb/lib/core/topologies/server.js:688:16)
    at Server.insert (/app/node_modules/mongodb/lib/topologies/topology_base.js:301:25)
    at insertDocuments (/app/node_modules/mongodb/lib/operations/common_functions.js:259:19)
    at InsertOneOperation.execute (/app/node_modules/mongodb/lib/operations/insert_one.js:26:5)
    at executeOperation (/app/node_modules/mongodb/lib/operations/execute_operation.js:77:17)
    at Collection.insertOne (/app/node_modules/mongodb/lib/collection.js:516:10)
    at createRun (/app/dist/execution/mongo/runs/run.model.js:24:59)
    at Object.createRun (/app/dist/execution/mongo/runs/run.controller.js:33:30)
    at app.post (/app/dist/app.js:47:53)
(node:27) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by t
hrowing inside of an async function without a catch block, or by rejecting a promise which was not handled
 with .catch(). (rejection id: 54)

mongo pod seems started successfully and connected successfully:

2020-04-13T22:56:09.516+0000 I INDEX    [LogicalSessionCacheRefresh] build index done.  scanned 0 total re
cords. 0 secs
2020-04-13T22:56:10.000+0000 I SHARDING [ftdc] Marking collection local.oplog.rs as collection version: <u
nsharded>
2020-04-13T22:56:10.307+0000 I NETWORK  [listener] connection accepted from 10.13.56.18:37516 #1 (1 connec
tion now open)
2020-04-13T22:56:10.308+0000 I NETWORK  [conn1] received client metadata from 10.13.56.18:37516 conn1: { d
river: { name: "nodejs", version: "3.5.5" }, os: { type: "Linux", name: "linux", architecture: "x64", vers
ion: "4.14.146-119.123.amzn2.x86_64" }, platform: "'Node.js v10.19.0, LE (legacy)" }
2020-04-13T23:01:09.504+0000 I SHARDING [LogicalSessionCacheReap] Marking collection config.transactions a
s collection version: <unsharded>
2020-04-13T23:22:32.821+0000 I SHARDING [conn1] Marking collection sorry-cypress.runs as collection versio
n: <unsharded>

Still investigating... I saw the same issue reported few times for cypress dashboard as well, so it might be not a dashboard related. However decided to log this to keep track.

Tests runs but not shown on the dashboard!

Hi Agoldis,

I run the cypress test every 30 mins on the development environment and after finishing I face on with this scene:
Dev-Auto-01222020121731-57701
Tests: 0
Passes: 0
Failures: 0
Pending: 0
Skipped: 0
Spec files
Overall: 14
Claimed: 0

So please tell me know how can I fix it?

Thanks

Option to override screenshot bucket url

sorry-cypress/blob/master/packages/director/src/screenshots/s3/s3.ts

line 5

allow override of AWS url from config file

import { S3_BUCKET } from './config';
import { S3_URL } from './config'; // default s3.amazonaws.com
import { S3SignedUploadResult } from './types';

const BUCKET_URL = https://${S3_BUCKET}.${S3_URL};

This will allow passing of EU url's (s3.eu-north-1.amazonaws.com) and fix the redirect error when uploading screenshots.

Suggestion: easy update of api_url

Hey, great project!

I think I found an easier way to update the api_url. This will replace any occurences in app.yml. That includes the development one but it could probably be updated to change only production if required.

sed -i -e 's|api_url:.*$|api_url: "https://sorry-cypress-demo-director.herokuapp.com/"|g' /*/.cache/Cypress/*/Cypress/resources/app/packages/server/config/app.yml

Docker compose

Hi,

What do you think about writing a docker compose file to run all 3 packages in a single command locally ?

Regards,

Quick Question regarding the dashboard URL

Hi,
I have set up this alternate dashboard as opposed to using cypress dashboard. i have my dashboard configured in :8080 and the director service in :8001. I have also changed the cypress app.yml to point to http://localhost:8001 (director service).
I am bit unsure on what url to specify when in the .env file for the director service to point to:

should it be http://localhost:8080 (my dahsboard) instead of

DASHBOARD_URL is what Cypress client shows as a "Run URL"

DASHBOARD_URL="https://sorry-cypress.herokuapp.com"

unable to upload screenshots/videos to S3

I used the CloudFormation template you provided to create and run the stack.
Director and dashboard services are working fine and results are displayed.
but S3 uploads are not working.
I have checked the aws role has the policy attached for respective S3 bucket put operations.
Here's the CloudWatch log extract:

 05:10:59
screenshotUploadUrls:
[{ readUrl:
'https://{bucketName}.s3.amazonaws.com/dbce2bcf6203650deb8575f73952ffe9.png',
uploadUrl:
'https://{bucketName}.s3.amazonaws.com/dbce2bcf6203650deb8575f73952ffe9.png?Content-Type=image%2Fpng&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=*****t&X-Amz-Date=20200415T051059Z&X-Amz-Expires=60&X-Amz-Security-Token=*****
screenshotId: 'qxjke' },
videoUploadInstructions:
{ readUrl:
'https://sorry-cypress-dev-test-results.s3.amazonaws.com/cb632523-cdb5-42d2-b33a-5dc9d3cd43da.mp4',
uploadUrl:
'https://{bucketName}.s3.amazonaws.com/cb632523-cdb5-42d2-b33a-5dc9d3cd43da.mp4?Content-Type=video%2Fmp4&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=****]

No error is displayed in log.
So it looks like it is uploading but there are no files in the bucket.
Although uploading error is shown in gitlab log

(Uploading Results)
   - Failed Uploading (1/3) /builds/qa/cypress-poc/cypress/screenshots/2_gift_cards_spec.js/Gift Cards Page Tests -- iframe demo - Verify user is able to buy gift cards (failed).png
   - Failed Uploading (2/3) /builds/qa/cypress-poc/cypress/screenshots/2_gift_cards_spec.js/Gift Cards Page Tests -- iframe demo - Verify user is able to buy gift cards (failed) (1).png
   - Failed Uploading (3/3) /builds/qa/cypress-poc/cypress/videos/2_gift_cards_spec.js.mp4

Is there any S3 related setting we need to in our cypress project.

AWS tutorial

Create demo / tutorial for running the project on AWS:

  • Fargate
  • EC2

Screenshots:

  • S3

Error when try it run in parallel

Hi! Cool project!

I deployed project services and making attempts to configure my CI jobs but API returns error like as:

StatusCodeError: 400 - "Must provide query string."

My command:

$(npm bin)/cypress run --record --parallel --ci-build-id "123" --key x

Cypress version: 3.6.0
API service: logs does not have an any errors
Director: logs does not have an any errors

Screenshot 2019-11-14 at 18 56 09

What am I doing wrong?

Error: Network error: Failed to fetch

Hi

I'm trying to set this up on a AWS ec2 instance with external mongodb cluster but when I go to the dashboard URL is see a message "Error: Network error: Failed to fetch"

I've tested the same docker-compose.yml file in my localhost and it works fine but it doesnt on the ec2 instance.
Logs seems ok

root@cypress:/opt/cypress# docker-compose -f docker-compose.yml up
Recreating cypress_director_1 ... done
Recreating cypress_api_1 ... done
Recreating cypress_dashboard_1 ... done
Attaching to cypress_director_1, cypress_api_1, cypress_dashboard_1
api_1 |
api_1 | > @sorry-cypress/[email protected] start /app
api_1 | > node ./dist/
api_1 |
api_1 | πŸš€ Apollo server ready at http://localhost:4000/
director_1 |
director_1 | > @sorry-cypress/[email protected] start /app
director_1 | > node ./dist/
director_1 |
director_1 | Initializing "stateful-mongo" execution driver...
director_1 | (node:25) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
director_1 | Successfully connected to MongoDB server
director_1 | Initializing "s3" screenshots driver...
director_1 | Listening on 1234...
dashboard_1 |
dashboard_1 | > @sorry-cypress/[email protected] start /app
dashboard_1 | > node ./server
dashboard_1 |
dashboard_1 | Listening on 8080...
dashboard_1 | β„Ή ο½’wdmο½£: Hash: 1603e534a929b7d4ab0a
dashboard_1 | Version: webpack 4.41.5
dashboard_1 | Time: 3727ms
dashboard_1 | Built at: 02/18/2020 2:56:56 PM
dashboard_1 | Asset Size Chunks Chunk Names
dashboard_1 | index.mjs 3.44 MiB main [emitted] main
dashboard_1 | views/index.ejs 728 bytes [emitted]
dashboard_1 | Entrypoint main = index.mjs
dashboard_1 | [0] multi ./src/index.tsx 28 bytes {main} [built]
dashboard_1 | [./node_modules/@apollo/react-hooks/lib/react-hooks.esm.js] 30 KiB {main} [built]
dashboard_1 | [./node_modules/bold-ui/lib/index.js] 331 bytes {main} [built]
dashboard_1 | [./node_modules/react-dom/cjs/react-dom.development.js] 947 KiB {main} [built]
dashboard_1 | [./node_modules/react-dom/index.js] 1.33 KiB {main} [built]
dashboard_1 | [./node_modules/react-router-dom/esm/react-router-dom.js] 9.76 KiB {main} [built]
dashboard_1 | [./node_modules/react/cjs/react.development.js] 72.7 KiB {main} [built]
dashboard_1 | [./node_modules/react/index.js] 190 bytes {main} [built]
dashboard_1 | [./src/Root.tsx] 2.02 KiB {main} [built]
dashboard_1 | [./src/components/layout/content.tsx] 648 bytes {main} [built]
dashboard_1 | [./src/components/layout/header.tsx] 1.38 KiB {main} [built]
dashboard_1 | [./src/index.tsx] 166 bytes {main} [built]
dashboard_1 | [./src/lib/apolloClient.ts] 1.23 KiB {main} [built]
dashboard_1 | [./src/theme/theme.ts] 1.32 KiB {main} [built]
dashboard_1 | [./src/views/InstanceDetailsView.tsx] 1.55 KiB {main} [built]
dashboard_1 | + 743 hidden modules
dashboard_1 | Child HtmlWebpackCompiler:
dashboard_1 | Asset Size Chunks Chunk Names
dashboard_1 | __child-HtmlWebpackPlugin_0 5.02 KiB HtmlWebpackPlugin_0 HtmlWebpackPlugin_0
dashboard_1 | Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
dashboard_1 | [./node_modules/html-webpack-plugin/lib/loader.js!./src/index.ejs] 909 bytes {HtmlWebpackPlugin_0} [built]
dashboard_1 | β„Ή ο½’wdmο½£: Compiled successfully.

any idea what could be the issue?

Github Integration

It would be nice to have a Github integration that reports test results as status checks.

First test randomly errors on thread when running: β€œInvalid or unexpected token”

Hello, this project is great and works great most of the time! We run our tests on a Codebuild on AWS and run 5 threads of the Cypress runner parallel with the director service on AWS. About a quarter of the time, the first test on one of the threads fails with this error:

An uncaught error was detected outside of a test
Invalid or unexpected token
This error originated from your test code, not from Cypress.
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
Cypress could not associate this error to any specific test. We dynamically generated a new test to display this failure.

Now I'm not sure if this a sorry cypress issue or not, but I didn't have an issue with it before switching to running in parallel. If you don't think this is a sorry cypress issue, I can close this issue.

Tried many things to try to fix this, including setting modifyObtrusiveCode to false, chromeWebSecurity to false, upgrading Cypress. We are already catching uncaught exceptions so that doesn't seem like it should be the issue. I turned on some extra logs for this and here is the output

[3] 2020-03-06T19:57:20.369Z cypress:server:project onMocha start
[3] 2020-03-06T19:57:20.369Z cypress:server:reporter got mocha event 'start' with args: [ { start: '2020-03-06T19:57:20.366Z' } ]
[3] 2020-03-06T19:57:20.374Z cypress:server:project onMocha suite
[3] 2020-03-06T19:57:20.374Z cypress:server:reporter got mocha event 'suite' with args: [ { id: 'r1', title: '', root: true, type: 'suite', file: 'cypress/integration/ci-tests/content-acquisition/channels/channel-manual-upload-run-acquired-items-tab.spec.ts' } ]
[3]
[3] 2020-03-06T19:57:20.390Z cypress:server:project onMocha test
[3] 2020-03-06T19:57:20.391Z cypress:server:reporter got mocha event 'test' with args: [ { id: 'r2', title: 'An uncaught error was detected outside of a test', body: 'function throwErr() {\n throw err;\n }', type: 'test' } ]

[3] 2020-03-06T19:57:20.555Z cypress:server:reporter got mocha event 'fail' with args: [ { id: 'r2', title: 'An uncaught error was detected outside of a test', err: { message: 'Unexpected end of input\n' + '\n' + 'This error originated from your test code, not from Cypress.\n' + '\n' + 'When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.\n' + '\n' + 'Cypress could not associate this error to any specific test.\n' + '\n' + 'We dynamically generated a new test to display this failure.', name: 'Uncaught SyntaxError', stack: 'Uncaught SyntaxError: Unexpected end of input\n' + '\n' + 'This error originated from your test code, not from Cypress.\n' + '\n' + 'When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.\n' + '\n' + 'Cypress could not associate this error to any specific test.\n' + '\n' + 'We dynamically generated a new test to display this failure.' }, state: 'failed', body: 'function throwErr() {\n      throw err;\n    }', type: 'test', duration: 179, wallClockStartedAt: '2020-03-06T19:57:20.374Z', timings: { lifecycle: 26, test: [Object] } } ]

I couldn't really make anything of these errors, but maybe someone else can. I'm kind of out of ideas on what to try (I've tried more things today than I've listed but can't recall them all). Any ideas?

General project improvements

Hey,

  1. Move the project to sorry-cypress namespace
  2. Split project into repositories
    • Director
    • Dashboard
    • API
    • Dockerfiles
    • Documentation
    • Playground (Demo)
  3. Extract the documentation and merge README.md and the Wiki
  4. Static code analyser / Linter?
  5. Unit testing?
  6. CI integration?

In case you would like to keep this inside a mono-repo then I suggest to create /docs folder inside each of the packages and link them inside README.md.

Keeping this as a mono-repo will make it quite hard to handle tooling and different CI stages. On the other hand the whole release and build cycle is getting complicated once you split this up.

Anyway, this are just suggestions to bring this project to the next level. The lack of unit testing and CI makes me feel a bit uncomfortable to use it on enterprise projects.

Provision to serve assests from private s3 buckets

  • the ACL used for generating upload url is public-read due to which upload fails for private buckets
  • Can we make the readUrl configurable such that we can serve s3 assets from a private bucket via a proxy or can we have signed get urls in the dashboard ?

Dashboard fails to load when cypress is run in docker (e.g. on CI) due to missing git information

Dashboard fails to load and displays "Error :(" if some of git related information is missing in the recorded job. The error is a result of another error coming from the graphql api:

Cannot return null for non-nullable field Commit.sha.
or
Cannot return null for non-nullable field Commit.remoteOrigin.

This may happen when Cypress is run in docker where there's no .git directory and environment variables to fetch the information from. This may also happen for some specific CI providers where some git information cannot be extracted by the Cypress test runners and it defaults to null (see https://github.com/cypress-io/cypress/blob/00a7e69ed267196c778bc3b22f6f8f0e28c30266/packages/server/lib/util/ci_provider.js#L441)

Sometimes a spec or 2 doesn't get picked up and ran - stuck in pending

I apologize for an issue without any repro steps, but not really sure how to repro it. I am running a codebuild with 5 Cypress parallel commands on it. Sometimes, there will be a spec or 2 that is stuck on the Pending state on the sorry cypress dashboard. When I search for the spec in the Codebuild logs, there is no mention of it. So something must be blocking it from getting picked up?

Report stacktrace for failed tests

Hi,
Is it feasible to add stack-traces to the dashboard for failed tests ? This will help avoiding the use of a separate reporter.

I haven't gone through the code and I'm not sure if cypress reports stack traces to the dashboard.
Let me know if I can help and it would be great if you can point me where I should start looking.
Thanks.

Director crashes if $schema is used in cypress.json

Hi, thanks for this awesome project! Wanted to let you know about a (minor) issue I ran into.

Problem
Director crashes with if UnhandledPromiseRejectionWarning $schema is used in cypress.json.
Locally, the run stalls with a HTTP 500 error.

Workaround
Simply remove $schema from cypress.json for now.

Possible Solution
Via the director side, ignore $schema if found in config file.

Traceback

Logs from cloudwatch in the director stream:

(node:19) UnhandledPromiseRejectionWarning: MongoError: The dollar ($) prefixed field '$schema' in 'results.cypressConfig.$schema' is not valid for storage.
    at Function.create (/app/node_modules/mongodb/lib/core/error.js:43:12)
    at toError (/app/node_modules/mongodb/lib/utils.js:149:22)
    at coll.s.topology.update (/app/node_modules/mongodb/lib/operations/common_functions.js:376:39)
    at /app/node_modules/mongodb/lib/core/connection/pool.js:404:18
    at process._tickCallback (internal/process/next_tick.js:61:11)
(node:19) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:19) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
>> Received instance result { instanceId: '2cfa93df-7f77-47d8-af8e-5ffe35a44db9' }
(node:19) UnhandledPromiseRejectionWarning: MongoError: The dollar ($) prefixed field '$schema' in 'results.cypressConfig.$schema' is not valid for storage.
    at Function.create (/app/node_modules/mongodb/lib/core/error.js:43:12)
    at toError (/app/node_modules/mongodb/lib/utils.js:149:22)
    at coll.s.topology.update (/app/node_modules/mongodb/lib/operations/common_functions.js:376:39)
    at /app/node_modules/mongodb/lib/core/connection/pool.js:404:18
    at process._tickCallback (internal/process/next_tick.js:61:11)
(node:19) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

Config File

Command: cypress run --parallel --record --key xxxx --ci-build-id "local-cy-test-run"

cypress.json:

{
  "$schema": "https://on.cypress.io/cypress.schema.json",
  "baseUrl": "http://localhost:8080",
  "env": {
    "NODE_ENV": "test",
    "VUE_APP_API_BASE_URL": "http://localhost:5000",
    "API_URL": "http://localhost:5000"
  },
  "ignoreTestFiles": ["**/__snapshots__/*", "**/__image_snapshots__/*"],
  "projectId": "xxxx",
  "viewportHeight": 900,
  "viewportWidth": 1400
}

error when trying to run locally on osx

I'm trying to get this to work on my Macbook. I followed instructions, and get this error when I run yarn start

yarn run v1.17.3
$ node --experimental-modules .
(node:92497) ExperimentalWarning: The ESM module loader is experimental.
internal/modules/esm/default_resolve.js:59
  let url = moduleWrapResolve(specifier, parentURL);
            ^

Error: Cannot find module '/DEV/_CYPRESS/sorry-cypress' imported from /DEV/_CYPRESS/sorry-cypress/
    at Loader.resolve [as _resolve] (internal/modules/esm/default_resolve.js:59:13)
    at Loader.resolve (internal/modules/esm/loader.js:73:33)
    at Loader.getModuleJob (internal/modules/esm/loader.js:149:40)
    at Loader.import (internal/modules/esm/loader.js:133:28)
    at internal/modules/cjs/loader.js:830:27
    at processTicksAndRejections (internal/process/task_queues.js:85:5) {
  code: 'ERR_MODULE_NOT_FOUND'
}
error Command failed with exit code 1.

Any idea what might be wrong?

Test Parallelization skipped first test

Just making a note of this in case someone else sees the same thing. When I ran this the first time (two consoles running the jobs in parallel using director), I noticed the first console started on job 2/XYZ and the second console started on job 3/XYZ.

At the end, I had one less report than normal, and when I finally got the dashboard up, I noticed that job 1 is still pending. I wonder if there is a handshake required...

image

AWS Codebuild run does not connect to Heroku Director URL

I have set up an AWS Codebuild build.yaml as follows as per #6 (comment):

version: 0.2

phases:
  pre_build:
    commands:
      - curl -L ${CYPRESS_DIRECTOR_URL}/ping
      - apt-get update -y
      - apt-get install -y dbus-x11 apt-transport-https libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 xvfb libgtk-3-0 libnss3 libxss1 libasound2 libxtst6 xauth
      - cd $CODEBUILD_SRC_DIR
      - npm ci
      - npm install concurrently wait-on -g
      - export TERM=xterm
      - export DBUS_SESSION_BUS_ADDRESS=/dev/null
      - sed -i -E "s@(api_url:) (.*)@\1 \"${CYPRESS_DIRECTOR_URL}/\"@g" /root/.cache/Cypress/*/Cypress/resources/app/packages/server/config/app.yml
  build:
    commands:
      - npm run test-headless
      - npm run cy:verify
      - npm run serve &
      - Xvfb :99 &
      - export DISPLAY=:99 &
      - unset NODE_OPTIONS
      - CYPRESS_CI_RUN_COMMAND="npm run cy:run -- --record --key ci-tests --parallel --ci-build-id Runner-${CODEBUILD_START_TIME}-${CODEBUILD_BUILD_ID}"
      - |
      - wait-on http://localhost:4200 && concurrently \
        "$CYPRESS_CI_RUN_COMMAND" \
        "$CYPRESS_CI_RUN_COMMAND"
      - pkill Xvfb

artifacts:
  files:
    - '**/*'
  base-directory: './cypress/results'

CYPRESS_DIRECTOR_URL is my Heroku Director URL (https://opsonion-ci.herokuapp.com). I could not figure out how to set up the Cloudformation stack due to incessant errors, so resorted to this approach.

Strangely enough, my test runs are not being picked up by the Heroku Director URL. The same set of tests run twice. I have tested the setup locally by running the following cmd script:

start cypress run --record --key ci-tests --parallel --ci-build-id Runner

The connections are picked up fine from my local machine.

My question: is it not possible to have a AWS Codebuild and Heroku (free) configuration setup? It might be ideal for people who don't want the overhead of paying for a long-running director/dashboard/api instance, especially as CodeBuild is pay per use.

Dashboard displays no data in Linux but stores videos in Amazon S3 successfully

Windows is fine, NO problems at all
But In Digital Ocean CentOs and Ubuntu, I see no data

image

Steps to reproduce the error:

1-Use One-Click install Docker in Digital Ocean (Ubuntu Only)

2-Update all tools
Docker version 19.03.1, build 74b1e89
Docker-compose version 1.25.5
Ubuntu / VERSION=18.04.3 LTS (Bionic Beaver)

3-Install Sorry Cypress 0.2.3 with my S3 credentials

3-Run docker-compose -f docker-compose.full.yml

4-Run Cypress on a different machine with app.yml pointing to Digital Ocean. Successful upload.
Note: Amazon S3 IS receiving the movies

Results:

image

Error messages on Chrome Console:
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/bold-ui/lib/components/Tabs/Tabs.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
http://localhost:4000/:1%20Failed%20to%20load%20resource:%20net::ERR_CONNECTION_REFUSED
Other error messages are in the screenshot but they are similar

Server log:

docker-compose -f docker-compose.full.yml up

Creating network "sorrycypress_default" with the default driver
Creating sorrycypress_mongo_1 ... done Creating sorrycypress_director_1 ... done Creating sorrycypress_api_1 ... done Creating sorrycypress_dashboard_1 ... done Attaching to sorrycypress_mongo_1, sorrycypress_director_1, sorrycypress_api_1, sorrycypress_dashboard_1
mongo_1 | 2020-04-29T04:36:34.611+0000 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
mongo_1 | 2020-04-29T04:36:34.619+0000 I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=6896398ced55
mongo_1 | 2020-04-29T04:36:34.620+0000 I CONTROL [initandlisten] db version v4.0.18
mongo_1 | 2020-04-29T04:36:34.621+0000 I CONTROL [initandlisten] git version: 6883bdfb8b8cff32176b1fd176df04da9165fd67
mongo_1 | 2020-04-29T04:36:34.621+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016
mongo_1 | 2020-04-29T04:36:34.621+0000 I CONTROL [initandlisten] allocator: tcmalloc
mongo_1 | 2020-04-29T04:36:34.621+0000 I CONTROL [initandlisten] modules: none
mongo_1 | 2020-04-29T04:36:34.621+0000 I CONTROL [initandlisten] build environment:
mongo_1 | 2020-04-29T04:36:34.621+0000 I CONTROL [initandlisten] distmod: ubuntu1604
mongo_1 | 2020-04-29T04:36:34.621+0000 I CONTROL [initandlisten] distarch: x86_64
mongo_1 | 2020-04-29T04:36:34.621+0000 I CONTROL [initandlisten] target_arch: x86_64
mongo_1 | 2020-04-29T04:36:34.622+0000 I CONTROL [initandlisten] options: { net: { bindIpAll: true } }
director_1 |
director_1 | > @sorry-cypress/[email protected] start /app
director_1 | > node ./dist/
director_1 |
mongo_1 | 2020-04-29T04:36:34.624+0000 I STORAGE [initandlisten]
mongo_1 | 2020-04-29T04:36:34.625+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
mongo_1 | 2020-04-29T04:36:34.625+0000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
mongo_1 | 2020-04-29T04:36:34.625+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=484M,cache_overflow=(file_max=0M),session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
mongo_1 | 2020-04-29T04:36:36.458+0000 I STORAGE [initandlisten] WiredTiger message [1588134996:458101][1:0x7f132fd72a80], txn-recover: Set global recovery timestamp: 0
mongo_1 | 2020-04-29T04:36:36.474+0000 I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
mongo_1 | 2020-04-29T04:36:36.492+0000 I CONTROL [initandlisten]
mongo_1 | 2020-04-29T04:36:36.492+0000 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
mongo_1 | 2020-04-29T04:36:36.492+0000 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
mongo_1 | 2020-04-29T04:36:36.492+0000 I CONTROL [initandlisten]
mongo_1 | 2020-04-29T04:36:36.492+0000 I STORAGE [initandlisten] createCollection: admin.system.version with provided UUID: c8f84b59-b64f-4fd6-a731-ad938a6ca208
mongo_1 | 2020-04-29T04:36:36.506+0000 I SHARDING [initandlisten] Marking collection admin.system.version as collection version:
mongo_1 | 2020-04-29T04:36:36.506+0000 I COMMAND [initandlisten] setting featureCompatibilityVersion to 4.0
mongo_1 | 2020-04-29T04:36:36.507+0000 I SHARDING [initandlisten] Marking collection local.system.replset as collection version:
mongo_1 | 2020-04-29T04:36:36.507+0000 I SHARDING [initandlisten] Marking collection admin.system.roles as collection version:
mongo_1 | 2020-04-29T04:36:36.507+0000 I STORAGE [initandlisten] createCollection: local.startup_log with generated UUID: 26f76b08-1db8-41ee-a63b-6283948c5a3a
mongo_1 | 2020-04-29T04:36:36.520+0000 I SHARDING [initandlisten] Marking collection local.startup_log as collection version:
mongo_1 | 2020-04-29T04:36:36.520+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
api_1 |
api_1 | > @sorry-cypress/[email protected] start /app
api_1 | > node ./dist/
api_1 |
mongo_1 | 2020-04-29T04:36:36.525+0000 I SHARDING [LogicalSessionCacheRefresh] Marking collection config.system.sessions as collection version:
mongo_1 | 2020-04-29T04:36:36.525+0000 I STORAGE [LogicalSessionCacheRefresh] createCollection: config.system.sessions with generated UUID: 026fb069-4c60-48a0-9d0f-6d0a851d6b64
mongo_1 | 2020-04-29T04:36:36.526+0000 I NETWORK [initandlisten] waiting for connections on port 27017
mongo_1 | 2020-04-29T04:36:36.549+0000 I INDEX [LogicalSessionCacheRefresh] build index on: config.system.sessions properties: { v: 2, key: { lastUse: 1 }, name: "lsidTTLIndex", ns: "config.system.sessions", expireAfterSeconds: 1800 }
mongo_1 | 2020-04-29T04:36:36.549+0000 I INDEX [LogicalSessionCacheRefresh] building index using bulk method; build may temporarily use up to 500 megabytes of RAM
mongo_1 | 2020-04-29T04:36:36.549+0000 I INDEX [LogicalSessionCacheRefresh] build index done. scanned 0 total records. 0 secs
mongo_1 | 2020-04-29T04:36:36.550+0000 I SHARDING [LogicalSessionCacheReap] Marking collection config.transactions as collection version:
mongo_1 | 2020-04-29T04:36:37.000+0000 I SHARDING [ftdc] Marking collection local.oplog.rs as collection version:
dashboard_1 |
dashboard_1 | > @sorry-cypress/[email protected] start /app
dashboard_1 | > node ./server
dashboard_1 |
director_1 | Initializing "stateful-mongo" execution driver...
director_1 | (node:25) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
mongo_1 | 2020-04-29T04:36:41.023+0000 I NETWORK [listener] connection accepted from 172.18.0.3:58592 #1 (1 connection now open)
mongo_1 | 2020-04-29T04:36:41.062+0000 I NETWORK [conn1] received client metadata from 172.18.0.3:58592 conn1: { driver: { name: "nodejs", version: "3.5.6" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.15.0-58-generic" }, platform: "'Node.js v10.19.0, LE (legacy)" }
director_1 | Successfully connected to MongoDB server
director_1 | Initializing "s3" screenshots driver...
mongo_1 | 2020-04-29T04:36:41.934+0000 I STORAGE [conn1] createCollection: sorry-cypress.runs with generated UUID: 3eb2f85d-0b16-43d6-890c-8685653fdc5e
director_1 | Listening on 1234...
mongo_1 | 2020-04-29T04:36:41.938+0000 I NETWORK [listener] connection accepted from 172.18.0.3:58596 #2 (2 connections now open)
mongo_1 | 2020-04-29T04:36:41.939+0000 I NETWORK [conn2] received client metadata from 172.18.0.3:58596 conn2: { driver: { name: "nodejs", version: "3.5.6" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "4.15.0-58-generic" }, platform: "'Node.js v10.19.0, LE (legacy)" }
mongo_1 | 2020-04-29T04:36:41.949+0000 I SHARDING [conn1] Marking collection sorry-cypress.runs as collection version:
mongo_1 | 2020-04-29T04:36:41.956+0000 I INDEX [conn1] build index on: sorry-cypress.runs properties: { v: 2, unique: true, key: { runId: 1 }, name: "runId_1", ns: "sorry-cypress.runs" }
mongo_1 | 2020-04-29T04:36:41.956+0000 I INDEX [conn1] building index using bulk method; build may temporarily use up to 500 megabytes of RAM
mongo_1 | 2020-04-29T04:36:41.957+0000 I INDEX [conn1] build index done. scanned 0 total records. 0 secs
mongo_1 | 2020-04-29T04:36:41.958+0000 I STORAGE [conn2] createCollection: sorry-cypress.instances with generated UUID: 9b525126-820f-4ee2-9e1d-a555afd343f3
mongo_1 | 2020-04-29T04:36:41.973+0000 I SHARDING [conn2] Marking collection sorry-cypress.instances as collection version:
mongo_1 | 2020-04-29T04:36:41.982+0000 I INDEX [conn2] build index on: sorry-cypress.instances properties: { v: 2, unique: true, key: { instanceId: 1 }, name: "instanceId_1", ns: "sorry-cypress.instances" }
mongo_1 | 2020-04-29T04:36:41.982+0000 I INDEX [conn2] building index using bulk method; build may temporarily use up to 500 megabytes of RAM
mongo_1 | 2020-04-29T04:36:41.984+0000 I INDEX [conn2] build index done. scanned 0 total records. 0 secs
api_1 | πŸš€ Apollo server ready at http://localhost:4000/
dashboard_1 | Listening on 8080...
dashboard_1 | β„Ή ο½’wdmο½£: Hash: 4701af221de2d5e4b7e4
dashboard_1 | Version: webpack 4.43.0
dashboard_1 | Time: 6363ms
dashboard_1 | Built at: 04/29/2020 4:36:49 AM
dashboard_1 | Asset Size Chunks Chunk Names
dashboard_1 | index.mjs 3.26 MiB main [emitted] main
dashboard_1 | views/index.ejs 728 bytes [emitted]
dashboard_1 | Entrypoint main = index.mjs
dashboard_1 | [0] multi ./src/index.tsx 28 bytes {main} [built]
dashboard_1 | [./node_modules/@apollo/react-hooks/lib/react-hooks.esm.js] 30.4 KiB {main} [built]
dashboard_1 | [./node_modules/bold-ui/lib/index.js] 331 bytes {main} [built]
dashboard_1 | [./node_modules/react-dom/cjs/react-dom.development.js] 839 KiB {main} [built]
dashboard_1 | [./node_modules/react-dom/index.js] 1.33 KiB {main} [built]
dashboard_1 | [./node_modules/react-router-dom/esm/react-router-dom.js] 9.76 KiB {main} [built]
dashboard_1 | [./node_modules/react/cjs/react.development.js] 59.2 KiB {main} [built]
dashboard_1 | [./node_modules/react/index.js] 190 bytes {main} [built]
dashboard_1 | [./src/Root.tsx] 2.19 KiB {main} [built]
dashboard_1 | [./src/components/layout/content.tsx] 661 bytes {main} [built]
dashboard_1 | [./src/components/layout/header.tsx] 1.43 KiB {main} [built]
dashboard_1 | [./src/index.tsx] 180 bytes {main} [built]
dashboard_1 | [./src/lib/apolloClient.ts] 1.23 KiB {main} [built]
dashboard_1 | [./src/theme/theme.ts] 1.32 KiB {main} [built]
dashboard_1 | [./src/views/InstanceDetailsView.tsx] 1.66 KiB {main} [built]
dashboard_1 | + 718 hidden modules
dashboard_1 | Child HtmlWebpackCompiler:
dashboard_1 | Asset Size Chunks Chunk Names
dashboard_1 | __child-HtmlWebpackPlugin_0 5.02 KiB HtmlWebpackPlugin_0 HtmlWebpackPlugin_0
dashboard_1 | Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
dashboard_1 | [./node_modules/html-webpack-plugin/lib/loader.js!./src/index.ejs] 909 bytes {HtmlWebpackPlugin_0} [built]
dashboard_1 | β„Ή ο½’wdmο½£: Compiled successfully.
director_1 | >> Machine is asking to join a run { recordKey: 'xxxxxxxx-xxxx-xxxx-a647-62ec2f273de5',
director_1 | ciBuildId: '126' }
director_1 | >> Machine is joining a run { ciBuildId: '126' }
director_1 | << Responding to machine { groupId: 'win32-10.0.18363-126',
director_1 | machineId: 'b27c5f44-18c5-4e2a-9a89-b9357e02836c',
director_1 | runId: 'ba4b1f6efbdb7bd7c328510115f8fab9',
director_1 | runUrl: 'http://localhost:8080/run/ba4b1f6efbdb7bd7c328510115f8fab9',
director_1 | warnings: [] }
director_1 | >> Machine is requesting a new task { runId: 'ba4b1f6efbdb7bd7c328510115f8fab9',
director_1 | machineId: 'b27c5f44-18c5-4e2a-9a89-b9357e02836c',
director_1 | groupId: 'win32-10.0.18363-126' }
director_1 | << Sending new task to machine { spec:
director_1 | 'cypress\integration\moa-customer-portal\08-login\8a-moacustomer-login-registration.js',
director_1 | instanceId: '3db11dc0-4ffc-4584-8511-e823876fc5b1',
director_1 | claimed: false }
director_1 | >> Received instance result { instanceId: '3db11dc0-4ffc-4584-8511-e823876fc5b1' }
director_1 | << Sending assets upload URLs { instanceId: '3db11dc0-4ffc-4584-8511-e823876fc5b1',
director_1 | screenshotUploadUrls: [],
director_1 | videoUploadInstructions:
director_1 | { readUrl:
director_1 | 'https://REMOVEDBUCKETADDRESSBEFOREPOSTING.s3.amazonaws.com/3db11dc0-4ffc-4584-8511-e823876fc5b1.mp4',
director_1 | uploadUrl:
director_1 | 'https://REMOVEDBUCKETADDRESSBEFOREPOSTING.s3.ca-central-1.amazonaws.com/3db11dc0-4ffc-4584-8511-e823876fc5b1.mp4?Content-Type=video%2Fmp4&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=REMOVEDCREDENTIALBEFOREPOSTING%2F20200429%2Fca-central-1%2Fs3%2Faws4_request&X-Amz-Date=20200429T044718Z&X-Amz-Expires=90&X-Amz-Signature=8fc15921c1842dc0e13636f23de78b4d3f182a76c80c0b5ecd4080b1c14e6a87&X-Amz-SignedHeaders=host%3Bx-amz-acl&x-amz-acl=public-read' } }
director_1 | >> [not implemented] Received stdout for instance { instanceId: '3db11dc0-4ffc-4584-8511-e823876fc5b1' }
director_1 | >> Machine is requesting a new task { runId: 'ba4b1f6efbdb7bd7c328510115f8fab9',
director_1 | machineId: 'b27c5f44-18c5-4e2a-9a89-b9357e02836c',
director_1 | groupId: 'win32-10.0.18363-126' }
director_1 | << Sending new task to machine { spec:
director_1 | 'cypress\integration\moa-customer-portal\08-login\8b-moacustomer-login-forgot-password-reset.js',
director_1 | instanceId: 'b83a4e75-ad95-4e87-84e1-127dd249f218',
director_1 | claimed: false }
director_1 | >> Received instance result { instanceId: 'b83a4e75-ad95-4e87-84e1-127dd249f218' }
director_1 | << Sending assets upload URLs { instanceId: 'b83a4e75-ad95-4e87-84e1-127dd249f218',
director_1 | screenshotUploadUrls:
director_1 | [ { readUrl:
director_1 | 'https://REMOVEDBUCKETADDRESSBEFOREPOSTING.s3.amazonaws.com/a5147610c6743e8939475bc9771e71d8.png',
director_1 | uploadUrl:
director_1 | 'https://REMOVEDBUCKETADDRESSBEFOREPOSTING.s3.ca-central-1.amazonaws.com/a5147610c6743e8939475bc9771e71d8.png?Content-Type=image%2Fpng&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=REMOVEDCREDENTIALBEFOREPOSTING%2F20200429%2Fca-central-1%2Fs3%2Faws4_request&X-Amz-Date=20200429T045007Z&X-Amz-Expires=60&X-Amz-Signature=688eebfa307f300cb4c31449fbaa7722d4e9a84b71f79d0a76ba9887036a6d75&X-Amz-SignedHeaders=host%3Bx-amz-acl&x-amz-acl=public-read',
director_1 | screenshotId: 'j3htt' } ],
director_1 | videoUploadInstructions:
director_1 | { readUrl:
director_1 | 'https://REMOVEDBUCKETADDRESSBEFOREPOSTING.s3.amazonaws.com/b83a4e75-ad95-4e87-84e1-127dd249f218.mp4',
director_1 | uploadUrl:
director_1 | 'https://REMOVEDBUCKETADDRESSBEFOREPOSTING.s3.ca-central-1.amazonaws.com/b83a4e75-ad95-4e87-84e1-127dd249f218.mp4?Content-Type=video%2Fmp4&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=REMOVEDCREDENTIALBEFOREPOSTING%2F20200429%2Fca-central-1%2Fs3%2Faws4_request&X-Amz-Date=20200429T045007Z&X-Amz-Expires=90&X-Amz-Signature=d61792e8fc3996dc93107faf350dcfc53cf3adff222dfe658aea1bd88922237b&X-Amz-SignedHeaders=host%3Bx-amz-acl&x-amz-acl=public-read' } }
director_1 | >> [not implemented] Received stdout for instance { instanceId: 'b83a4e75-ad95-4e87-84e1-127dd249f218' }
director_1 | >> Machine is requesting a new task { runId: 'ba4b1f6efbdb7bd7c328510115f8fab9',
director_1 | machineId: 'b27c5f44-18c5-4e2a-9a89-b9357e02836c',
director_1 | groupId: 'win32-10.0.18363-126' }
director_1 | << Sending new task to machine { spec:
director_1 | 'cypress\integration\moa-customer-portal\08-login\8c-moacustomer-login-sign-in-sign-out.js .js',
director_1 | instanceId: '7b8dabaa-5f22-4d01-b32f-5bbbb6b74f96',
director_1 | claimed: false }
director_1 | >> Received instance result { instanceId: '7b8dabaa-5f22-4d01-b32f-5bbbb6b74f96' }
director_1 | << Sending assets upload URLs { instanceId: '7b8dabaa-5f22-4d01-b32f-5bbbb6b74f96',
director_1 | screenshotUploadUrls: [],
director_1 | videoUploadInstructions:
director_1 | { readUrl:
director_1 | 'https://REMOVEDBUCKETADDRESSBEFOREPOSTING.s3.amazonaws.com/7b8dabaa-5f22-4d01-b32f-5bbbb6b74f96.mp4',
director_1 | uploadUrl:
director_1 | 'https://REMOVEDBUCKETADDRESSBEFOREPOSTING.s3.ca-central-1.amazonaws.com/7b8dabaa-5f22-4d01-b32f-5bbbb6b74f96.mp4?Content-Type=video%2Fmp4&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=REMOVEDCREDENTIALBEFOREPOSTING%2F20200429%2Fca-central-1%2Fs3%2Faws4_request&X-Amz-Date=20200429T045028Z&X-Amz-Expires=90&X-Amz-Signature=6cb8108f81ee15828a13c8a473dea1b5d474d5299b8f1d9f3a99dfdefba5c8d1&X-Amz-SignedHeaders=host%3Bx-amz-acl&x-amz-acl=public-read' } }
director_1 | >> [not implemented] Received stdout for instance { instanceId: '7b8dabaa-5f22-4d01-b32f-5bbbb6b74f96' }
director_1 | >> Machine is requesting a new task { runId: 'ba4b1f6efbdb7bd7c328510115f8fab9',
director_1 | machineId: 'b27c5f44-18c5-4e2a-9a89-b9357e02836c',
director_1 | groupId: 'win32-10.0.18363-126' }
director_1 | << All tasks claimed { runId: 'ba4b1f6efbdb7bd7c328510115f8fab9',
director_1 | machineId: 'b27c5f44-18c5-4e2a-9a89-b9357e02836c' }

Allow reusing --ci-build-id after a timeout

I have run docker-compose up, changed the configuration of cypress and was able to run tests in two parallel threads. After initial test run I am not able to make a second test run. Looks like service sees that test run exists in the dashboard and skipping test run.

When I make docker-compose down and then docker-compose up again, I can make single run but the second run doesn't work again.

Am I missing something in configuration?

Support grouping for the same run

Hi,

I am trying to integrate cypress in our jenkins based ci environment.

I have separated tests for mobile and desktop versions of the site using a file naming convention as *.mobile.spec.js and *.desktop.spec.js and *.common.spec.js

When I run cypress in the following form by passing the same --ci-build-id but different --spec , two different runs are created in the dashboard.

 parallel (
                "cypress mobile tests process 1" : {
                        def returnCode1 = sh returnStatus: true, script: "cypress run --record --key something --parallel --ci-build-id ${env.BUILD_TAG} --env TEST_TAGS=${tags} --config baseUrl=${baseUrl} --config-file cypress.mobile.json --spec 'cypress/integration/**/*.mobile.spec.js' ", label: "Running"
                        returnCodes.add(returnCode1)
                },
                "cypress mobile tests process 2": {
                        def returnCode2 = sh returnStatus: true, script: "cypress run --record --key something --parallel --ci-build-id ${env.BUILD_TAG} --env TEST_TAGS=${tags} --config baseUrl=${baseUrl} --config-file cypress.mobile.json --spec 'cypress/integration/**/*.mobile.spec.js' ", label: "Running"
                        returnCodes.add(returnCode2)
                },
                "cypress common tests process 1": {
                        def returnCode5 = sh returnStatus: true, script: "cypress run --record --key something --parallel --ci-build-id ${env.BUILD_TAG} --env TEST_TAGS=${tags} --config baseUrl=${baseUrl} --config-file cypress.mobile.json --spec 'cypress/integration/**/*.common.spec.js' ", label: "Running"
                        returnCodes.add(returnCode5)                    
                }
)

Let me know if any more information is needed.

Thanks.

0.3.0 breaks director service

The director service in 0.3.0 fails to run with the following error:

director_1   | > @sorry-cypress/[email protected] start /app
director_1   | > node ./dist/
director_1   |
director_1   | internal/modules/cjs/loader.js:638
director_1   |     throw err;
director_1   |     ^
director_1   |
director_1   | Error: Cannot find module 'core-js/modules/es.promise'
director_1   |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
director_1   |     at Function.Module._load (internal/modules/cjs/loader.js:562:25)
director_1   |     at Module.require (internal/modules/cjs/loader.js:692:17)
director_1   |     at require (internal/modules/cjs/helpers.js:25:18)
director_1   |     at Object.<anonymous> (/app/dist/index.js:3:1)
director_1   |     at Module._compile (internal/modules/cjs/loader.js:778:30)
director_1   |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
director_1   |     at Module.load (internal/modules/cjs/loader.js:653:32)
director_1   |     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
director_1   |     at Function.Module._load (internal/modules/cjs/loader.js:585:3)

AWS Tutorial: Unable to deploy stack in AWS

Hi ,
I am trying to set up the stack in AWS - I went through your tutorial and it seemed pretty straight forward. So I did click through few buttons on screen but unfortunately it kept saying ROLLBACK IN PROGRESS> Any help much appreciated
image

Load More button on Dashboard skips one recorded run

It seems that the Load More button on the Dashboard always skips one record. Let's say that we have the following runs recorded:
[1, 2, 3, 4, 5, 6, 7, 8]
By default, [6, 7, 8] are displayed and the Load More button, however, when it's clicked then the following runs are displayed: [2, 3, 4, 6, 7, 8]. Apparently, run number 5 is omitted and it cannot be displayed.

Azure support

Hi,
are there any plans to support one of the Azure Storage services for screenshot driver?
If yes then when we can expect it?

Regards

Jenkins Integration?

Hi @agoldis ,

First of all, great work! Just had a quick read through the source code and this is some amazing stuff you have done here. I've got a couple of questions I'd love if you could explain.

  • How would the dashboard integration with a CI tool? e.g. Jenkins
  • Where is the parallelisation happening? i.e in the CI tool or in the dashboard itself?
  • Where are tests actually running?

For the last question let me give you a bit of context.

Say we are doing a bit of custom things within cypress for example you install a package which does not come out of the box and then within cypress you execute a task in order to have that package execute some logic.

Taking that use case into consideration where are tests actually ran? The reason I'm asking is because if they are in the director how does it know which packages it needs to have installed before running the tests etc.

Thank you for your time!

version in docker-compose unsupported

new to this. got an error saying Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.
please help

General instability and console bugs

My Digital Ocean was on and off and I could not figure out whether it was a problem on the server side or database.

I suddenly lost all of the data, then it came back out of the blue. Then I lost again (it said no data on the dashboard) then a CORS problem on Chrome console. For some reason it disappeared after I whitelisted http://cypressdashboard.id.cast-soft.com:4000 (graphQL schema) in Bitdefender Antivirus (not my choice company policy). However, I don't know if that was related because the reason I had to whitelist was that it was being displayed as a possible phishing website.

Can you please record a quick video on how to run on debug mode the 3 instances on a baremetal or digital ocean server? I'm a beginner in programming but I was able to solve some basic security issues on a simple node app (without docker) by installing and configuring Helmet, then running against security scanners such as Mozilla Observatory.

Also is there a way to avoid having to access the dashboard without the 8080 on the URL or using a redirect?

I'm getting these errors on console (please check http://cypressdashboard.id.cast-soft.com:8000)

react-dom.development.js:88 Warning: Encountered two children with the same key, `972f7bb96abf8f878b49ffb0ddff5f63`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted β€” the behavior is unsupported and could change in a future version.
    in RunsView (created by Context.Consumer)
    in Route (created by Root)
    in section (created by Content)
    in Content (created by Root)
    in ErrorBoundary (created by Root)
    in Router (created by BrowserRouter)
    in BrowserRouter (created by Root)
    in ThemeProvider (created by Root)
    in ApolloProvider (created by Root)
    in Root
printWarning @ react-dom.development.js:88
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/@apollo/react-hooks/lib/react-hooks.esm.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/@apollo/react-common/lib/react-common.esm.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/ts-invariant/lib/invariant.esm.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/apollo-client/bundle.esm.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/apollo-utilities/lib/bundle.esm.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/@wry/equality/lib/equality.esm.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/apollo-link/lib/bundle.esm.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/zen-observable-ts/lib/bundle.esm.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/react-router-dom/esm/react-router-dom.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for webpack:///node_modules/react-router/esm/react-router.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME

DASHBOARD_URL in code defaults to 3333

Hi, I'm really excited about saving $200-300/month as a startup with 0 customers a ton of end-to-end tests!
It was a little confusing getting this up and going since the DASHBOARD_URL for the director has it default to localhost:3333, when I think the dashboard is defaulting to port 4000. This should probably be updated.

Video Support

Hey, @agoldis do you have planned to add the function to upload videos and show it in the dashboard? Right now if we have enabled the videos function are being recording and saving into the directory where we are running, it would be great if you have planned to add something similar to Screenshot Driver but in this case for videos.
image

[PLEASE HELP] Implement cypress wrapper

Today it might be scary and inconvenient to change cypress configuration to use the dashboard.
Having a wrapper that gets API endpoint URL as a CLI argument / configuration would simplify the use.

🚨 UPDATE:
Please upvote the ticket by @csvan: overriding core config vars here: cypress-io/cypress#7164

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.