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

Cover Several Environments As Part of Testing #52

Closed
4 of 5 tasks
D4nte opened this issue Apr 22, 2021 · 15 comments
Closed
4 of 5 tasks

Cover Several Environments As Part of Testing #52

D4nte opened this issue Apr 22, 2021 · 15 comments
Assignees
Labels
E:Comprehensive dev testing See https://github.com/waku-org/pm/issues/90 for details test Issue related to the test suite with no expected consequence to production code
Projects

Comments

@D4nte
Copy link
Contributor

D4nte commented Apr 22, 2021

Planned start date:
Due date:

Summary

js-waku library is meant for browser usage.
Most of the testing is currently done via NodeJS, which is not ideal especially that cryptographic functions uses the Web Crypto API or NodeJS's crypto modules or bindings. Meaning testing in NodeJS does not mean it would work in the Browser.

#230 laid some basis on how to get browser testing as part of the CI. However, it is not complete:

  1. No Firefox run (only chrome)
  2. No test done against nim-waku for js-waku in the browser

Acceptance Criteria

  • js-waku tests run against both Chrome and Firefox web engines
  • js-waku test include bundling and running a simple apps written in several framework (TBD, at least React and Vite)

Tasks

Note: aegir uses Karma for browser tests so it should be possible to test it. It could make orchestration easier thanks to the before and after hooks.

RAID (Risks, Assumptions, Issues and Dependencies)

  • Need to avoid scope creep for this issue. In terms of bundler testing, the most demanded framework so far are React and Svelte
  • It seems that migration to Jest may be needed to more easily achieve this task
@D4nte D4nte added this to Backlog in js-waku via automation Apr 22, 2021
@D4nte D4nte mentioned this issue Apr 22, 2021
5 tasks
@D4nte D4nte added the good first issue Good for newcomers label Apr 26, 2021
@D4nte D4nte added this to the Developer Ready milestone Apr 28, 2021
@D4nte D4nte moved this from Backlog to Icebox in js-waku Apr 28, 2021
@littlealex003
Copy link
Contributor

You want to deploy the code, fire up a browser and connect to it with something like Selenium, to replicate a real deployment, correct?

@D4nte
Copy link
Contributor Author

D4nte commented Apr 28, 2021

I do not have much knowledge about testing JS code against a browser. What are the options?

Yes, the idea is to ensure that the library is tested in an environment closest to real deployment.

I was going to do something similar to what js-libp2p does as I assume it should be good enough.

@littlealex003
Copy link
Contributor

I will look at the js-libp2p; I mean if we want to we can do a full automated deployment, launch browsers with automated control, and run tests against the actual deployed application, on as many different OS / Browser combinations as we like. It really depends how many platforms we want to support and thorough we want to be about testing the JavaScript on different platforms and browsers.

The tests I saw before looked like they were using mocked objects, I'm not sure what automated tests there are but I'll look more.

@littlealex003
Copy link
Contributor

It looks like js-libp2p is using https://ipfs.github.io/aegir/ I'm not familiar with it; it has a "browser" test mode, though it's not entirely clear what that is doing. We could implement this same library

@D4nte
Copy link
Contributor Author

D4nte commented Apr 29, 2021

Hum, I am enjoy the integration of Webstorm (my IDE) with mocha/chai. Not really keen to move to another test framework that does not integrate well (I moved away from ava for this reason exactly).

Isn't selenium about testing UI component and simulating user actions? We don't really do that as js-waku does not have an UI element.

@littlealex003
Copy link
Contributor

littlealex003 commented Apr 29, 2021 via email

@D4nte D4nte added the help wanted Extra attention is needed label May 7, 2021
@D4nte D4nte removed this from the Developer Ready milestone Feb 11, 2022
@D4nte D4nte moved this from Icebox to Backlog in js-waku Feb 11, 2022
@D4nte D4nte moved this from Backlog (old, to groom) to Backlog (groomed) in js-waku May 23, 2022
@fryorcraken fryorcraken added milestone Tracks a subteam milestone track:restricted-run Restricted run track (Secure Messaging/Waku Product), e.g. filter, WebRTC test Issue related to the test suite with no expected consequence to production code and removed good first issue Good for newcomers labels Aug 25, 2022
@fryorcraken fryorcraken moved this from Backlog to Moved to Waku Product Project in js-waku Aug 26, 2022
@fryorcraken fryorcraken changed the title Run tests suite in browser environment Run tests suite in more browser environment (Firefox, Opera) Jan 31, 2023
@fryorcraken fryorcraken changed the title Run tests suite in more browser environment (Firefox, Opera) Run tests suite in more browser environment (Firefox, etc) Jan 31, 2023
@weboko weboko self-assigned this Apr 21, 2023
@fryorcraken

This comment was marked as resolved.

@fryorcraken fryorcraken changed the title Run tests suite in more browser environment (Firefox, etc) [Milestone] Cover Several Environments As Part of Testing Aug 9, 2023
@weboko weboko removed the help wanted Extra attention is needed label Aug 9, 2023
@fryorcraken fryorcraken changed the title [Milestone] Cover Several Environments As Part of Testing [Epic] Cover Several Environments As Part of Testing Aug 24, 2023
@fryorcraken fryorcraken added epic Tracks a yearly team epic (only for waku-org/pm repo) and removed milestone Tracks a subteam milestone labels Aug 24, 2023
@weboko
Copy link
Collaborator

weboko commented Aug 29, 2023

Weekly Update

  • achieved: created front-end app to be run in a pipeline
  • next: complete app and run in the pipeline, figure out next steps to run Firefox

@weboko
Copy link
Collaborator

weboko commented Sep 4, 2023

Weekly update:

  • achieved: finishing testing against chrome and react;
  • next: investigate other adding browsers;

@weboko
Copy link
Collaborator

weboko commented Sep 11, 2023

Weekly update:

  • achieved: browser testing is redone and opening for review
  • next: integrate with release process - rather quick follow up, revisit current epic

@fryorcraken fryorcraken removed the track:restricted-run Restricted run track (Secure Messaging/Waku Product), e.g. filter, WebRTC label Sep 12, 2023
@weboko
Copy link
Collaborator

weboko commented Sep 18, 2023

Weekly update:

  • achieved: got reviews on playwrights tests
  • next: maybe add bounty, check Karma testing

@fryorcraken fryorcraken assigned fbarbu15 and unassigned fbarbu15 Sep 21, 2023
@fryorcraken fryorcraken added E:2023-qa E:Comprehensive dev testing See https://github.com/waku-org/pm/issues/90 for details and removed E:2023-qa epic Tracks a yearly team epic (only for waku-org/pm repo) labels Sep 22, 2023
@fryorcraken fryorcraken changed the title [Epic] Cover Several Environments As Part of Testing Cover Several Environments As Part of Testing Sep 22, 2023
@weboko
Copy link
Collaborator

weboko commented Sep 22, 2023

Weekly update:

  • achieved: improved karma testing, added testing in browser

@weboko
Copy link
Collaborator

weboko commented Sep 22, 2023

Since #887 is not urgent delaying the ticket.

@fryorcraken
Copy link
Collaborator

@weboko I think we can close thsi issue as we now test in Firefox and webkit. #887 can be a ticket on its own.

@weboko
Copy link
Collaborator

weboko commented Oct 18, 2023

@fryorcraken agree, closing

@weboko weboko closed this as completed Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:Comprehensive dev testing See https://github.com/waku-org/pm/issues/90 for details test Issue related to the test suite with no expected consequence to production code
Projects
Archived in project
js-waku
Moved to Waku Product Project
Development

Successfully merging a pull request may close this issue.

5 participants