Git Product home page Git Product logo

cypress-utils's Introduction

Profile header

WebsiteStack Overflow BadgeLinkedin BadgeGmail BadgePreferred Editor Badge


I’m an engineer who is interested in Automated Systems and Next-Gen Web Technologies.

I was born in the United States 🇺🇸 , growing up in Arizona 🏜 and currently living in New York City 🗽.

I work as a Senior Software Engineer @ Squarespace on the Character team. We're a small team of two engineers and two designers who bring trendy and bespoke website design elements to the Squarespace website editor product. This allows our customers to build a website that has character — standing out by expressing their story in an esthetic and engaging way.

See the projects pinned below to see what I've been interested in lately 👇🏻

cypress-utils's People

Contributors

dependabot[bot] avatar diegogomez01 avatar istateside avatar samwyldkw avatar trentrand 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

Watchers

 avatar  avatar  avatar  avatar

cypress-utils's Issues

Test failure screenshots cleared by subsequent successful samples

Headless cypress runs take screenshots whenever a test fails, but unfortunately the subsequent successful runs (e.g. during a stress test) seem to clear out these screenshot files.

Investigate whether this behavior can be disabled, and whether we can namespace the screenshots so that they are not overwritten for each failure.

Can't find specified specs files

No matter what I do, I can't seem to stress-test against one spec file:

$ npx cypress-utils stress-test Orders/SGO.spec.js

No Cypress spec files were found. You may have specified invalid file identifiers.

The following file identifiers were provided: "Orders/SGO.spec.js"

Your configuration specifies that test files are contained within the following directory:
`./specs`

See help for the `--integrationFolder` command-line option if this is incorrect.

In my config:

  "integrationFolder": "./specs",
  "testFiles": "**/*.spec.js",

I have tried:

  • entering the full path to the spec file
  • entering the relative path
  • entering just the name "SGO"
  • entering just "Orders/SGO"
  • any thing else you could possibly think of

The file is definitely there in the specs folder.

This same spec will run just fine if I don't specify it and just allow it to run all specs- but that's not what I'm trying to stress test.

Is there any way to get this thing to print out what specs it does find so that I can figure out what it wants me to refer to the spec as?

Test identifiers are matched case-sensitively

When specifying the command-line options using capital letters, results are never found.

I believe the issue is that the strings are compared to lower-case versions of the filenames, but the test identifiers themselves are not casted to lowercase also.

Error

When running, npx cypress-utils --help, i get this.

`/home/user/node_modules/cypress-utils/index.js:185
argv.testFiles = argv.testFiles ?? cypressConfig.testFiles ?? '**/.';
^

SyntaxError: Unexpected token '?'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47
`

Add log output when no tests are found

The current commands return the following output when no Cypress spec files are found:

“Command completed in 0 seconds”

This messaging should be more explicit, alerting the user that their test identifiers are incorrect.

Error when trying to execute commands

Hi, I'm having an issue when trying to execute parallel and stress commands.

When I execute run-parallel with two specific files it runs well until the end and then this appears:

Command completed in 14 seconds.

D:(...)\node_modules\cypress-utils\node_modules\async\asyncify.js:114
            throw e;
            ^

TypeError: results.filter(...).map(...).flat is not a function
    at computeResults (D:(...)\node_modules\cypress-utils\index.js:88:84)
    at handleResults (D:(...)\node_modules\cypress-utils\index.js:128:28)
    at err (D:(...)\node_modules\cypress-utils\node_modules\async\internal\map.js:27:9)
    at wrapper (D:(...)\node_modules\cypress-utils\node_modules\async\internal\once.js:12:16)
    at iterateeCallback (D:(...)\node_modules\cypress-utils\node_modules\async\internal\eachOfLimit.js:63:24)
    at D:(...)\node_modules\cypress-utils\node_modules\async\internal\onlyOnce.js:12:16
    at _iteratee (D:(...)\node_modules\cypress-utils\node_modules\async\internal\map.js:24:13)
    at invokeCallback (D:(...)\node_modules\cypress-utils\node_modules\async\asyncify.js:111:9)
    at promise.then.value (D:(...)\node_modules\cypress-utils\node_modules\async\asyncify.js:103:9)`

When I execute the stress command as npx cypress-utils stress-test business --trialCount 12 --threads 4, the same error appears:

Array(...).fill(...).flat is not a function

Do you have any idea about this and how to solve it?

Failing to run the example

Hi, I've been trying to use this tool without much success.

I've cloned and installed cypress-utils and cloned cypress-example-kitchensink.

When trying to follow the example gif exactly I'm getting this error:

> cypress-utils stress-test location navigation

No Cypress spec files were found. You may have specified invalid file identifiers.

The following file identifiers were provided: "location", "navigation"

Your configuration specifies that test files are contained within the following directory:
`cypress/integration`

See help for the `--integrationFolder` command-line option if this is incorrect.

Any idea what I may be doing wrong?

Support for .feature files

Hi everyone, In my project I use .feature files for my tests. 🥒

When I try to execute $(npm bin)/cypress-utils stress-test path/to/file.feature I got this error:

.../node_modules/cypress-utils/index.js:185
argv.testFiles = argv.testFiles ?? cypressConfig.testFiles ?? '**/*.*';
                                 ^

SyntaxError: Unexpected token '?'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47

On my Cypress.json I have this properties:

"testFiles": "**/*.feature",
"integrationFolder": "src/test/resources/"

Does this plugin only works with spec.js files?

Thanks 😄

Stress-test and variables

Hello,

Sorry for my bad english, i hope you understand my question.

I used few days agos cypress-utils stress-test.
But i can't find any solution for use variable.
For exemple i want to call one test X times but for X differents customers and X differents users.

It's not possible.
I would like to be able to pass some kind of array with environment variables URL, User, PWD for example

thank's

Print a running log of runner results

As the stress-test is running (maybe parallel runner too?), it'd be nice to have an on-going list printed after each test.

This could be implemented as a "X of Y tests passed" or at least a counter to know what trial you're on.

Print simplified result at end of process

At the end of the command's process, it'd be nice to include a simple print-out of results after (or before?) the details results table.

This should be something simple and easy to read, removing the need to mentally divide the tests per file with the total success/fails. For example, this may read as “the spec passed X/Y times”.

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.