-
-
Notifications
You must be signed in to change notification settings - Fork 718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested test structures? #20
Comments
Right now we don't provide any kind of nesting. |
Hmm. That's kind of disappointing, particularly since Mocha does support nesting suites. Here's my use case. Right now, with that 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. |
Thanks for the idea. We will add option to reuse instance of a browser.
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. |
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. |
Would be nice to see your script. I wonder how much time you're saving doing it this way? |
@markerikson That may interest you #167 |
I think this can be closed as all helpers have |
Trying to play around with CodeceptJS, having never actually used Mocha or anything similar before. Mocha's docs seem to indicate that you can set up nested tests using
describe()
andit()
. It looks like Codecept'sFeature()
andScenario()
are an alternative method to setting up Mocha's Suites. Is there a similar way to set up nested tests using CodeceptJS? For example, something vaguely like:The text was updated successfully, but these errors were encountered: