Implement BDD interface and nested fixtures
See original GitHub issuedescribe('Utils', () => {
describe('compose', () => {
it('composes from right to left', () => {
...
});
});
});
Issue Analytics
- State:
- Created 7 years ago
- Reactions:35
- Comments:13 (4 by maintainers)
Top Results From Across the Web
Nested tests / subtests · Issue #5511 · DevExpress/testcafe
We already received an enhancement request: Implement BDD interface and nested fixtures. So I'll close this one as a duplicate.
Read more >Features All Test Frameworks Should Have | Chad Austin
Nested fixtures allow reusing common environments across many tests. The BDD frameworks tend to support that because nested contexts are one of their ......
Read more >Integration Testing with xUnit - Jimmy Bogard
The general idea is that fixtures must be supplied via the constructor, so I have to create a bit of a nested doll...
Read more >BDDMockito (Mockito 3.3.3 API) - javadoc.io
public class BDDMockito extends Mockito. Behavior Driven Development style of writing tests uses //given //when //then comments as fundamental parts of your ...
Read more >Interacting With Web Pages | Serenity BDD Users Manual
When you need to use a page object in one of your steps, you just need to declare a variable of type PageObject...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Adding to what @inikulin reported, take for example jest, which lets you nest multiple
describe
sections, including each section’s hooks. See my comment here.Sure,
lets say that i have a page with a form that could be in 2 different modes: read-only and editing. As name suggests, you should switch to the edit mode before you can change any values in the form. Rendering for those is different too. I would like to have something like the following:
This allows to group tests together and have a single setup point for a group. Furthermore, it allows to apply some metadata to sections and use it in reporting afterwards
It is possible to replicate similar behavior by moving those preparations into a separate function and calling them in every test, setting up metadata on every test etc. But this leads to a lot of duplication in code.