yew icon indicating copy to clipboard operation
yew copied to clipboard

Develop E2E Tests

Open vitiral opened this issue 7 years ago • 5 comments

This is a proposal to develop simple end to end (E2E) unit tests by simply using the current (and future) examples/.

The design is as follows:

  • Spin up a global instance of headless chromium
  • Write unit tests in selenium python for each example. These will basically just make sure that each example runs as expected.

The unit test "framework" will:

  • Compile each example with cargo web deploy
  • Run the example specific test defined in examples/<EXAMPLE>/tests which will test against target/deploy/index.html using the global headless browser.

I had a similar framework with artifact so I can go ahead and start on this if @DenisKolodin is okay with the design.

vitiral avatar Apr 10 '18 14:04 vitiral

with the examples all combined into a "single example" this will be much easier. Good job!

vitiral avatar Apr 10 '18 19:04 vitiral

I think I will be doing this for artifact using https://github.com/jonhoo/fantoccini (selenium for rust basically) within the next month or so. Once I've got the hang of it I could do the same treatment to yew.

I think this would help development and stability a lot. Let me know what you think

vitiral avatar May 10 '18 20:05 vitiral

I think this would be great! Were you able to make any progress on this @vitiral? Would you like to continue to work on this? If not, I'd be happy to do this after I finish the DevTools (if I'm ever actually able to get them to work).

teymour-aldridge avatar Jun 11 '20 09:06 teymour-aldridge

Glad you like the idea! No I won't be able to work on it as I haven't been doing web-dev lately and have a million other projects, including a third child to be born soon :D

vitiral avatar Jun 11 '20 16:06 vitiral

No worries :) I'll try and work on this if I have some time.

teymour-aldridge avatar Jun 11 '20 16:06 teymour-aldridge