A new request with request id 11649 has been created by koha-devel-request@lists.koha-community.org. Short info on the request is :

Title : Koha-devel Digest, Vol 196, Issue 17
Category :
Description :
Send Koha-devel mailing list submissions to
    koha-devel@lists.koha-community.org

To subscribe or unsubscribe via the World Wide Web, visit
    https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
or, via email, send a message with subject or body 'help' to
    koha-devel-request@lists.koha-community.org

You can reach the person managing the list at
    koha-devel-owner@lists.koha-community.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Koha-devel digest..."


Today's Topics:

1. Re: I played with Cypress (and ERM and Vue)
(Victor Grousset/tuxayo)
2. Re: I played with Cypress (and ERM and Vue) (Jonathan Druart)


----------------------------------------------------------------------

Message: 1
Date: Wed, 23 Mar 2022 02:58:04 +0100
From: Victor Grousset/tuxayo <victor@tuxayo.net>
To: 'Jonathan Druart' <jonathan.druart@bugs.koha-community.org>
Cc: 'koha-devel' <koha-devel@lists.koha-community.org>
Subject: Re: [Koha-devel] I played with Cypress (and ERM and Vue)
Message-ID: <9fdac965-cf66-b759-2c99-4f435f95744f@tuxayo.net>
Content-Type: text/plain; charset=UTF-8; format=flowed

Hi :)

Nice to hear that. How was coding UI tests compared to Selenium?
And the API tests compared to the current way?
It's good that Cypress provides an alternative to both.

The Cypress section of this comparison with Puppeteer, Selenium, and
Playwright was not impressive compared to Puppeteer and Playwright.
https://www.testim.io/blog/puppeteer-selenium-playwright-cypress-how-to-choose/

And it seems some parts of Koha (with pop up windows) wouldn't be
testable with Cypress :o
https://docs.cypress.io/guides/references/trade-offs#Multiple-tabs
and I think the workaround wouldn't work for us since our pop ups are
used to fill a field in the calling window:
https://github.com/cypress-io/cypress-example-recipes/tree/master/examples/testing-dom__tab-handling-links

Also about iframes, with Firefox, Cypress can't at all interact inside
them. Could that be an issue if one day we want to use Cypress in Koha?
Given that Koha has a few minor iframes.

But it's the only Selenium alternative in the 3 to have a community
development. As opposed to Puppeteer and Playwright being developed >95%
by Google and Microsoft respectively. So who knows if one of the two has
so much success that Google or Microsoft drops their efforts on
maintaining the other one. Or one looses traction. It's not the first
time they would drop support to a project[1] and Firefox support should
be expected to always be precarious. (it's still experimental for Puppeteer)
On the other hand it's libre/open source so we can hope on the long term
there will always be a community to do the minimal maintenance. Hard to
say about Firefox support though.

[1] There is some dev stuff the following lists. Not enough to be
certain of the risks. (So I'm might be spreading FUD due to GAFAM
allergy) But enough to be wary about projects whose top committers are
from a single company. Which totally have the right to change their
priorities, no issues with that.
https://killedbygoogle.com/
https://killedbymicrosoft.info/


Cheers,

--
Victor Grousset/tuxayo


------------------------------

Message: 2
Date: Wed, 23 Mar 2022 10:46:41 +0100
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To: "Victor Grousset/tuxayo" <victor@tuxayo.net>
Cc: koha-devel <koha-devel@lists.koha-community.org>
Subject: Re: [Koha-devel] I played with Cypress (and ERM and Vue)
Message-ID:
    <CAJzKNY6qyqM13aqR0Fj2NHw3ZUkJXur7zEduS3_DF1jtTfFarg@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

> Nice to hear that. How was coding UI tests compared to Selenium?

It's easier to write and easier to debug (given the screenshot and the
ability to inspect the DOM after each test).

> And the API tests compared to the current way?

Please have a look at the patch, or at least the very succinct commit
messages "We are mocking the REST API routes responses", so they are
not tested with Cypress in this patch. If we are not mocking the
routes, they won't replace the existing tests as it will become
end-to-end integration tests. Both will be useful.

> ... was not impressive compared to Puppeteer and Playwright.

Yes, there is always another alternative, but no code to show me the comparison.

> I think the workaround wouldn't work for us since our pop up are
> used to fill a field in the calling window

Yes, I know, there is a TODO in the code. I was planning to have a
modal instead, which would be nice, but that was too many changes.
If it's the only problem, it should not block us from choosing
Cypress. We don't have many pop-ups, and I don't think we are already
testing them anyway.

Le mer. 23 mars 2022 à 02:58, Victor Grousset/tuxayo
<victor@tuxayo.net> a écrit :
>
> Hi :)
>
> Nice to hear that. How was coding UI tests compared to Selenium?
> And the API tests compared to the current way?
> It's good that Cypress provides an alternative to both.
>
> The Cypress section of this comparison with Puppeteer, Selenium, and
> Playwright was not impressive compared to Puppeteer and Playwright.
> https://www.testim.io/blog/puppeteer-selenium-playwright-cypress-how-to-choose/
>
> And it seems some parts of Koha (with pop up windows) wouldn't be
> testable with Cypress :o
> https://docs.cypress.io/guides/references/trade-offs#Multiple-tabs
> and I think the workaround wouldn't work for us since our pop ups are
> used to fill a field in the calling window:
> https://github.com/cypress-io/cypress-example-recipes/tree/master/examples/testing-dom__tab-handling-links
>
> Also about iframes, with Firefox, Cypress can't at all interact inside
> them. Could that be an issue if one day we want to use Cypress in Koha?
> Given that Koha has a few minor iframes.
>
> But it's the only Selenium alternative in the 3 to have a community
> development. As opposed to Puppeteer and Playwright being developed >95%
> by Google and Microsoft respectively. So who knows if one of the two has
> so much success that Google or Microsoft drops their efforts on
> maintaining the other one. Or one looses traction. It's not the first
> time they would drop support to a project[1] and Firefox support should
> be expected to always be precarious. (it's still experimental for Puppeteer)
> On the other hand it's libre/open source so we can hope on the long term
> there will always be a community to do the minimal maintenance. Hard to
> say about Firefox support though.
>
> [1] There is some dev stuff the following lists. Not enough to be
> certain of the risks. (So I'm might be spreading FUD due to GAFAM
> allergy) But enough to be wary about projects whose top committers are
> from a single company. Which totally have the right to change their
> priorities, no issues with that.
> https://killedbygoogle.com/
> https://killedbymicrosoft.info/
>
>
> Cheers,
>
> --
> Victor Grousset/tuxayo


------------------------------

Subject: Digest Footer

_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/


------------------------------

End of Koha-devel Digest, Vol 196, Issue 17
*******************************************


NOTE: You are receiving this mail because, the Requester/Technician wanted you to get notified on this request creation.