Giter Club home page Giter Club logo

yeti-adaptors's Introduction

Obsolete!!!11!

I landed a PR in Yeti to add built-in support for Mocha, Jasmine and better output for QUnit. If you grab >= 0.2.14 you don't need adaptors anymore.

Some specific hints to make sure your tests run correctly

QUnit

In order for Yeti or Bunyip to collect results you may need to add this code block to your test suite.

if("$yetify" in window) {
	QUnit.config.autostart = false;
}

Sometimes QUnit will autorun before Yeti can attach to the QUnit logging events. There is a known issue with asyncTest() see #117

Jasmine

Same goes for Jasmine tests, Yeti will kick of the tests when it's ready so wrap your execute call in this block.

if(!("$yetify" in window)) {
	jasmineEnv.execute();
}

Where jasmineEnv is a reference to jasmine.getEnv().

Mocha

Mocha, like Jasmine, should only trigger a run when not being fed through Yeti/Bunyip.

if(!("$yetify" in window)) {
    var runner = mocha.run();
}

Yeti adaptors

A collection of adaptors so you can use Yahoo's Yeti tool with other unit testing frameworks.

To find out how you can use them navigate to the unit testing framework you use.

Contribute

I've only done adaptors for jasmine and QUnit, but if you use another framework feel free to fork and add it in the same style as the other examples.

yeti-adaptors's People

Contributors

ryanseddon avatar

Stargazers

Lê Trần Duy Tân avatar Francesc Rosas avatar Hadrian D'Souza avatar Krister Kari avatar Buba Sargsian avatar Joakim B avatar Aaron Powell avatar Umar Hansa avatar Igor Zinovyev avatar Duncan Kolba avatar Matt Motherway avatar Philip Roche avatar Esa-Matti Suuronen avatar  avatar Andrew Jones avatar Paul Irish avatar Simon Højberg avatar Jonas von Andrian avatar

Watchers

Krister Kari avatar  avatar

Forkers

webxl bleadof tscbp

yeti-adaptors's Issues

Mocha support

I'll eventually implement this if no-one has beaten me to it.

quit yeti adaptor throws error in IE8 (XP)

bunyip was hanging in my console, so I went to actual browser to see what might be the reason for it and saw IE8 on XP throwing this:

'$yetify.socket.json' is null or not an object qunit-yeti-adaptor.js, line 21 character 9

bunyip should probably survive it anyway and hint something back into the console.

Stuck at 0% complete

It appears to be stuck at 0% complete. Same thing occurs with both Mocha & Qunit. Downloaded and run in an Ubuntu environment with Yeti v. 0.2.9

git clone https://github.com/ryanseddon/yeti-adaptors.git
cd yeti-adaptors/Mocha/demo
yeti index.html

Creating a Hub at http://localhost:9000
Waiting for agents to connect at http://localhost:9000.
When ready, press Enter to begin testing.
  Agent connected: Chrome (18.0.1025.168) / Linux

✔ Testing started on Chrome (18.0.1025.168) / Linux
Testing... / 0% complete (0/1) 22.10 tests/sec

The test does however complete in the browser, but nothing appears to be streamed back.

✖ Script error: Uncaught SyntaxError: Unexpected token <

This is the actual output for the error:

✔ Testing started!
✖ Script error: Uncaught SyntaxError: Unexpected token <
  URL: http://localhost:9000/batch/1340445013755269719/test/tests/XMLHttpRequest.html
  Line: 1
  User-Agent: Chrome (19.0.1084.56) / Mac OS
✔ Agent completed: Chrome (19.0.1084.56) / Mac OS
0 tests passed! (794ms)

I was having hard time to track it down, but then once I removed all my test cases with < symbols in it, like for (i = 0; i < this.allowed.length; i++) {, etc, Yeti was able to run the test... ??

Yeti 0.2.6 doesn't work with these adaptors

Yeti 0.2.6 had moved away from socket.io to SockJS and hence these adaptors will only work with <=0.2.5

Investigate potential solutions. If anyone wants to have a go please do!

TypeError

Hi,

I've just installed bunyip (0.2.1) and I got an error with the command:

bunyip -f example_runner.html local -l "chrome"

I get:

[TypeError: undefined is not a function]

I ran the example downloaded from:
https://github.com/ryanseddon/yeti-adaptors/tree/master/jasmine/demo

When I tried on my own tests (and pagekite + browserstack):

romumac:tests romuald$ bunyip -f index.html -b ios
[TypeError: undefined is not a function]
null
  BrowserStack iPhone 5 6.0 worker launched: 407837
  BrowserStack iPhone 4S (6.0) 6.0 worker launched: 407838
  BrowserStack iPhone 4S 5.1 worker launched: 407840
  BrowserStack iPhone 4 4.0 worker launched: 407839
  BrowserStack iPhone 3GS 3.0 worker launched: 407841
  BrowserStack iPad 3.2 worker launched: 407842
  BrowserStack iPad 3rd (6.0) 6.0 worker launched: 407843
  BrowserStack iPad 3rd 5.1 worker launched: 407845
  BrowserStack iPad 2 (5.0) 5.0 worker launched: 407846
  BrowserStack iPad 2 4.3.2 worker launched: 407844
romumac:tests romuald$ 

A bunyip -s gives me:

  romumac:tests romuald$ bunyip -s
  Running:
        iPhone 5 - 6.0 (407837) 
  Queued:
        iPhone 4S (6.0) - 6.0 (407838) 
        iPhone 4 - 4.0 (407839) 
        iPhone 4S - 5.1 (407840) 
        iPhone 3GS - 3.0 (407841) 
        iPad - 3.2 (407842) 
        iPad 3rd (6.0) - 6.0 (407843) 
        iPad 2 - 4.3.2 (407844) 
        iPad 3rd - 5.1 (407845) 
        iPad 2 (5.0) - 5.0 (407846) 
  romumac:tests romuald$ 

As you can see, basically the suite doesn't run.

I'm on a Mac 10.6.8 (snow leopard), with node 0.8.12, npm 1.1.63, bunyip 0.2.1, jasmine 1.2.0.
I'll try tomorrow at work on a different Mac.

Any idea?

Cheers.

Romu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.