testkube icon indicating copy to clipboard operation
testkube copied to clipboard

Specify Browser in running cypress tests.

Open Garvit-Jethwani opened this issue 2 years ago • 4 comments

Describe the enhancement you'd like to see Cypress tests run in default electron browser, is there any way we can introduce browser option in running cypress tests.

Additional context Please specify if someone wants to run tests in browser other than electron, is there any way we can change the browser in configuration file or in test create and execute struct.

Garvit-Jethwani avatar Jul 13 '22 09:07 Garvit-Jethwani

Hey, @Garvit-Jethwani We support --args parameter for test execution. So,in general you can call it like kubectl testkube run test cypress-test --args '--browser chromium'

But at the moment Cypress supports the following browsers:

  • chrome
  • chromium
  • edge
  • electron
  • firefox

You can also use a custom browser: https://on.cypress.io/customize-browsers

Available browsers found on your system are:

  • electron

So, we need to install more browsers to this executor. Just let @TheBrunoLopes know, which one do you need and we will update Docker image, or might be,you want to contribute ;)

vsukhin avatar Jul 13 '22 10:07 vsukhin

Hi @Garvit-Jethwani I think we would need to preinstall first browsers in Docker container which runs tests.

As I'm currently doing PoC about Docker images multiple builds for single executor with different images settings

Do you have any specific browser in mind?

exu avatar Jul 13 '22 10:07 exu

Hi @exu @vsukhin chrome browser would be enough for me, do tell me if there is anything in which I can contribute too. Thanks.

Garvit-Jethwani avatar Jul 13 '22 10:07 Garvit-Jethwani

Hi @Garvit-Jethwani thanks for trying Testkube, and sure there is a lot of things where you can contribute:

  • you can write a new executor for a testing framework of your choice (https://kubeshop.github.io/testkube/executor-custom/) - if there is not already created.
  • you can propose internal changes in case of any idea (https://kubeshop.github.io/testkube/contributing/)
  • We would love to check any pull request from external contributors
  • Last and not least - Just use testkube - it's very important to us to get real users' feedback to manage any possible edge case.

exu avatar Aug 04 '22 08:08 exu