Skip to content

Support for Array of Test Files #2994

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

Merged
merged 4 commits into from
Aug 25, 2021

Conversation

monsteramba
Copy link
Contributor

@monsteramba monsteramba commented Aug 19, 2021

Motivation/Description of the PR

  • Description of this PR, which problem it
    Updating the Working of the tests config option to run the specified tests instead of specifying them with the file path regex option.

Working Nature:

  • When the user runs with the command --tests, loadTest function is triggered which then takes the value from the tests config value.
  • In this PR the code checks for whether it’s an array, then it’ll push the elements of the array into the patterns variable which is then processed for the absolute path condition checking.
  • If it’s a path string it’ll then proceed as before this PR.
  • Also in this.testFiles is also checked for any duplicates before pushing the Absolute path.
  • This runs the code sequentially as when the cases are run before.

Benefits :

  • Users specify only the test files which are necessary to run, instead of a file regex which involves the user to either change the file name or move them to a new directory.

  • Resolves #issueId (if applicable).
    Multiple Test Cases as Array #2993
    Applicable helpers:

  • WebDriver

  • Puppeteer

  • Nightmare

  • REST

  • FileHelper

  • Appium

  • Protractor

  • TestCafe

  • Playwright

Applicable plugins:

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

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)

Screen Shots
image

@DavertMik
Copy link
Contributor

This should be mentioned in the documentation.
@monsteramba Could you update docs as well?

@monsteramba
Copy link
Contributor Author

This should be mentioned in the documentation.
@monsteramba Could you update docs as well?

Sure @DavertMik

@monsteramba
Copy link
Contributor Author

This should be mentioned in the documentation.
@monsteramba Could you update docs as well?

@DavertMik I have updated the documentation, Kindly verify the same.

@senthillkumar
Copy link
Contributor

@DavertMik , kindly review the changes and merge the request.

Thanks,
Senthil B.

@DavertMik
Copy link
Contributor

Everything looks good! Thanks for making it!

@DavertMik DavertMik merged commit 760ff1c into codeceptjs:3.x Aug 25, 2021
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