Giter Site home page Giter Site logo

Comments (7)

DavertMik avatar DavertMik commented on May 22, 2024 2

I think this can be closed as all helpers have restart: false option which can be used to reuse browser session

from codeceptjs.

DavertMik avatar DavertMik commented on May 22, 2024

Right now we don't provide any kind of nesting.
And there is no something like that in nearest plans. One feature per file for now.

from codeceptjs.

markerikson avatar markerikson commented on May 22, 2024

Hmm. That's kind of disappointing, particularly since Mocha does support nesting suites.

Here's my use case. Right now, with that I.amOnPage('/'); in Before(), Codecept appears to be bringing up a separate browser instance for every test. That's taking around 15s or so to execute a test.

I'd really like to be able to use a single Webdriver / browser instance for a series of tests. Beyond that, I'd like to be able to, say, run an initial test verifying that logging in works, then run additional tests after that that require having successfully logged in.

Again, I'm very new to actual automated testing and to Codecept, but that seems like a pretty useful scenario to support.

from codeceptjs.

DavertMik avatar DavertMik commented on May 22, 2024

Here's my use case. Right now, with that I.amOnPage('/'); in Before(), Codecept appears to be bringing up a separate browser instance for every test. That's taking around 15s or so to execute a test.

Thanks for the idea. We will add option to reuse instance of a browser.

Beyond that, I'd like to be able to, say, run an initial test verifying that logging in works, then run additional tests after that that require having successfully logged in.

This concept is somehow harder to implement. As you will probably have LOTS of tests where user is logged in (and probably in different files) and one test for a login. Probably this will require something like dependency tree for tests.

But in the end, I think that you don't need nested structures for this kind of tests. Yes, mocha support them, but CodeceptJS is about scenario-driven testing so it's better to keep it linear.

from codeceptjs.

arsa666 avatar arsa666 commented on May 22, 2024

Hello markerikson

I had the same issue, I hate waiting for the browser to open and close. What I did was that I created a script that concatenates many files into one and puts all my different file test into a single test all contained in the same Scenario(), this way I can test memory leaks in my app on the browser.

So far it works great. I can share you my script if you want.

from codeceptjs.

adrianblynch avatar adrianblynch commented on May 22, 2024

Would be nice to see your script. I wonder how much time you're saving doing it this way?

from codeceptjs.

Nighthawk14 avatar Nighthawk14 commented on May 22, 2024

@markerikson That may interest you #167

from codeceptjs.

Related Issues (20)

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.