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

Ospec needs a Karma story #9

Open
dead-claudia opened this issue Aug 12, 2019 · 5 comments
Open

Ospec needs a Karma story #9

dead-claudia opened this issue Aug 12, 2019 · 5 comments
Assignees

Comments

@dead-claudia
Copy link
Member

Mithril version:

Browser and OS:

Project:

Is this something you're interested in implementing yourself?

Description

ospec needs integrated with Karma so ospec users can use Karma for much easier cross-browser testing.

Why

This is mildly blocking for us moving to Karma internally - the only alternative is literally just moving to another framework. Also, users may appreciate this.

Possible Implementation

Open Questions

@dead-claudia dead-claudia self-assigned this Aug 12, 2019
@pygy pygy transferred this issue from MithrilJS/mithril.js Dec 11, 2019
@pygy
Copy link
Member

pygy commented Dec 11, 2019

Any reason why you want Karma over Selenium? I'm not familiar with the former, I've dabbled with the latter.

@dead-claudia
Copy link
Member Author

dead-claudia commented Dec 11, 2019 via email

@pygy
Copy link
Member

pygy commented Dec 11, 2019

I say this because the selenium API is rather straightforward (see the krausest benchmarks for an example) and you mentioned elsewhere a 2 second timeout issue with Karma.

Selenium is AFIAK a pretty stable code base. Karma is a Google project that comes with the usual caveats...

We could whip out an ospec-based meta-runner that delegates to selenium, gathers the results and displays them using our machinery. That would take about one page of code...

We can namespace the suites using o.new(browserName).

Edit: disentangling o.run() and o.oncompletion() API-wise would help here.

@dead-claudia
Copy link
Member Author

@pygy I do want to reiterate: Selenium is a browser automation tool first, even though it was designed with use for testing in mind. Karma was created first as a way to run tests in browsers, and was later generalized to support other means of running tests like through Selenium or other WebDriver-compatible APIs, but it's not itself a browser automation tool. Compare these two to Nightwatch.js, which does both.

I say this because the selenium API is rather straightforward (see the krausest benchmarks for an example) and you mentioned elsewhere a 2 second timeout issue with Karma.

That timeout is more browsers being slow, and slower machines (like my main development machine ATM) can sometimes trigger it. It's not usually a Karma issue, but a browser issue.

Selenium is AFIAK a pretty stable code base. Karma is a Google project that comes with the usual caveats...

Karma in my experience has been pretty stable the past few years. I have 3-year-old Karma configs that barely need changed at all, and even the last couple major updates have required just updating plugins and nothing else, not even config changes (aside from taking advantage of new features).

We could whip out an ospec-based meta-runner that delegates to selenium, gathers the results and displays them using our machinery. That would take about one page of code...

That could technically work, but I see no point in reinventing such a complicated wheel personally - it's not as simple as it sounds, and you'd need at least a couple dependencies to do it if you don't want to hand-roll everything. I would accept a patch to add one provided the API is well-documented and it's sufficiently easy to use, but I'm not going to write such a patch myself.

@pygy
Copy link
Member

pygy commented May 17, 2022

Is this still relevant?

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

2 participants