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

Browser Testing for WebGME apps #276

Open
umesh-timalsina opened this issue Apr 26, 2022 · 2 comments
Open

Browser Testing for WebGME apps #276

umesh-timalsina opened this issue Apr 26, 2022 · 2 comments

Comments

@umesh-timalsina
Copy link

webgme-cli uses plugins in the webgme-engine to generate files for plugins, visualizers etc... and the test suites use the _globals api provided by webgme to provide a range of well defined and customizable test suites. While, this works great for testing in a node environment, what is the recommended way to define an end-to-end browser testing regime for a webgme app?

Some Observations

Levaraging karma, there are certain inbrowser tests (esp. for the client api) that are used to test webgme-engine. Based on brief walkthrough of the code-base one can note that, for an end-to-end browser testing regime (For the UI or Plugins) that leverage the same techniques used in webgme-engine, one must:

  1. Configure karma to support requirejs and configure some requirejs paths that are used by webgme as well as the webgme app you are developing.
  2. Define your mocha tests that you want to execute using karma
  3. Import the projects that you want to run the tests on before starting a standalone server and run your tests after that

Can this be extended in such a way that the browser-testing support from webgme-engine provides a base configuration and server starting capabilities such that we can leverage that users (developers) can define their browser-tests?

@brollb
Copy link
Collaborator

brollb commented May 4, 2022

@kecso - Are you interested in something like this (ie, open to PRs implementing it)? The main idea is basically updating the generated plugin tests so they include automated tests for running the plugin in the browser, too.

@kecso
Copy link
Member

kecso commented May 4, 2022

I am not, but it would be useful nonetheless :).

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

No branches or pull requests

3 participants