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

How to run a single Jasmine suite? #97

Closed
ThomasMarz opened this issue Aug 14, 2019 · 7 comments
Closed

How to run a single Jasmine suite? #97

ThomasMarz opened this issue Aug 14, 2019 · 7 comments
Labels
enhancement New feature or request

Comments

@ThomasMarz
Copy link

ThomasMarz commented Aug 14, 2019

Hello uiveri5 team,

we develop a larger set of specs and want to

  • run all the specs
  • run a subset of the specs by specifying a single suite (e.g. only those which had errors before)

we want to do this from command line without chaning test code

i checked related issues to this but I am not fully how to achieve it:

i managed excluding suites from commandline with this: uiveri5 --config.specExclude=print
... but this approach did not work for running a dedicated suite

regards Thomas

@vobu
Copy link
Contributor

vobu commented Aug 15, 2019

hi,
probably {x|f}it and {x|f}describe might be of help here? even though it strictly means changing code, i found the options invalueable during dev.
best, v.
v.

@maximnaidenov
Copy link
Contributor

maximnaidenov commented Aug 27, 2019

Hi Thomas,
You can use the --specs= with a grep pattern to specify the tests you want to run. But the problem is that specs filtering is not (currently) aware of the declarative authentication. Auth will kick-in before every spec and will obviously fail on the second one as the user already has a session. So to overcome the issues, you must manually log-out the user at the end of every spec.
What I could suggest is to structure the suites with test objects that you combine in scenarios in dedicated spec files. For example you could have smoketest.spec.js, full.spec.js that both call some test/createcontent.js that actually contains the it() blocks.
We plan to work on spec groups and then will solve the issue with declarative authentication.

@ThomasMarz
Copy link
Author

Hi Maxim,
thank you. I tried in this direction but did not get it working with some strange issues I do not even want to elaborate. Is there some sample project with a best practice setup of folders and files?
regards Thomas

@tsaleksandrova
Copy link
Contributor

Hi Thomas,
Here is a solution we plan to merge: #149
If you're interested, you could try it out and see if it fits your needs
Feedback is appreciated!

@ArnaudBuchholz
Copy link

@maximnaidenov about your comment

We plan to work on spec groups and then will solve the issue with declarative authentication.

Any idea when this would be available ? Any update ?

@maximnaidenov
Copy link
Contributor

Suites are already available: https://github.com/SAP/ui5-uiveri5/blob/master/docs/usage/specorganization.md., currently we work on replacing the protractor runner, which will allow the implementation of browser restart. This way each spec will get a fresh browser, without the login session from the previous spec.

@tsaleksandrova tsaleksandrova added the enhancement New feature or request label Jul 23, 2020
@maximnaidenov
Copy link
Contributor

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants