Skip to content
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

[WIP] updated docs and worker events #2249

Merged
merged 5 commits into from
May 5, 2020
Merged

Conversation

DavertMik
Copy link
Contributor

@DavertMik DavertMik commented Mar 3, 2020

This is WIP PR which adds the following:

  • documentation for the custom parallel runner
  • added workers.before and workers.after events
  • improved by function to accept number of workers to split

TODO:

  • Make tests pass
  • Document workers API, add more examples for custom runners
  • Fix parallel execution for Gherkin scenarios
  • Improve API for event.all.result for a master process. This should be more documented/clarified on how to use it to retrieve errors

Applicable helpers:

  • WebDriver
  • Puppeteer
  • Nightmare
  • REST
  • FileHelper
  • Appium
  • Protractor
  • TestCafe
  • Playwright

Applicable plugins:

  • allure
  • autoDelay
  • autoLogin
  • customLocator
  • pauseOnFail
  • puppeteerCoverage
  • retryFailedStep
  • screenshotOnFail
  • selenoid
  • stepByStepReport
  • wdio

Type of change

  • 🔥 Breaking changes
  • 🚀 New functionality
  • 🐛 Bug fix
  • 📋 Documentation changes/updates
  • ♨️ Hot fix
  • 🔨 Markdown files fix - not related to source code
  • 💅 Polish code

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@DavertMik DavertMik requested a review from KMKoushik March 3, 2020 14:58
lib/workers.js Outdated
res(true);
}, 'bootstrapAll');
}));
event.dispatcher.emit(event.workers.before);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this way we can attach async hooks before workers were initialized

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterngtr this way we will be able to integrate ReportPortal with Codecept for parallel runs in worker.
See my PR reportportal/agent-js-codecept#3

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's awesome 👏 @DavertMik

docs/parallel.md Outdated
}
}
```
workers.on(event.all.result, (status, completed, workerStats) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@koushikmohan1996 I have really no idea what to write here in the docs
Can you help me? What are those objects and how to use them? :)
Maybe we can simplify API to it would be bit more clear?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I will write the docs

@github-actions
Copy link

github-actions bot commented May 5, 2020

🌀 Tests overview by Testomatio

Found 865 mocha tests in 75 files
No new tests added or removed

⚠️ List all skipped test (1)
📎 List all suites (63)

@DavertMik DavertMik merged commit acad276 into codeceptjs-v3.0 May 5, 2020
@DavertMik DavertMik deleted the improved-workers branch May 5, 2020 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants