Yeti & YUI

If you’re a YUI core developer, you should be using Yeti. Here’s how to get started.

Yeti runs JavaScript tests in any browser. With Yeti, you capture browsers once, then submit tests to those captured browsers during the day. Yeti takes care of running all of your tests in every browser you throw at it.

Yeti works best with modern browsers.

Make sure you have a recent Node.js then grab the latest Yeti:

npm install -g http://latest.yeti.cx

Daily setup

Open a new Terminal tab, cd to your YUI source, then start the Yeti server.

cd path/to/yui3
yeti -s
Yeti Hub started. LAN: http://10.1.1.10:9000
                  Local: http://localhost:9000

Now you’re set. Navigate your local browsers to the local link and your browsers elsewhere on your LAN to the LAN link.

It’s important that you run this from the yui3 directory and not inside the src or build directories. That’s because Yeti’s server will only serve files in the current directory, so if you started it inside src your tests wouldn’t be able to load ../build files like the YUI seed.

Optional: Tunnel out

Using Localtunnel, you can easily share a Yeti Hub with browsers outside your firewall.

gem install localtunnel
localtunnel 9000

Use the URL you get from localtunnel to connect more browsers.

Run your tests

This could not be easier.

cd path/to/yui3/src/your-component
yeti tests/unit/*.html

You’ll get test feedback right away. Feel free to abort with Ctrl-C and your browsers will reset for the next run automatically.

Easy coverage

Would you like to see code coverage, too?

yeti --query 'filter=coverage' tests/unit/*.html

Now you have line coverage in your output.

Use someone else’s Hub on your network

If someone else already has browsers setup on a Hub, you can easily use their Hub by giving Yeti the Hub’s URL. Here’s an example.

yeti --hub http://10.1.1.10:9000 tests/unit/*.html

If you started a Hub, share the LAN link with others on your network and have them use the --hub option with that URL.

This magic happens using HTTP upgrades, so simple proxies like Localtunnel or some Node.js cloud hosting providers won’t work for Hub sharing because they don’t handle these kinds of connections. Look for services that support WebSockets.

Run everything

Every automated test in the project can be submitted. This will take a while.

cd path/to/yui3
yeti src/**/tests/unit/*.html

More coming soon

I’m making this easier every day. If you’re annoyed by something, mention @reid on Twitter or discuss Yeti on the YUI Library forums. You can also file a bug against Yeti.

Yeti does not behave very well on older browsers. I am currently working on an all-new frontend that will be much more robust with error handling and reconnection. To keep up with what’s new, subscribe to the official Yeti blog where I highlight features and fixes for every Yeti release.

Published
Categorized as Work

Promotion, SIU Homecoming

On Thursday I got “promoted” to the Production department at SchoolCenter. This means I’ll be doing programming instead of general system administration. Right know I think that staying a sysadmin would be a better job, but I was offered a bit more money ($8/hr as opposed to $6.50/hr) and the ability to work longer and have a more flexible schedule. So I took the new job. I haven’t worked on programming PHP, the language SchoolCenter is written in, in a while… the last major PHP project I did was their telephone logging system I developed for them last summer. However, I pick up anything technology-related pretty quickly, and looking at the training manual it looks like I’ll have no problem.

This last Saturday was the SIU Homecoming Parade, which we didn’t do too well in this year. We only got 3rd place and we have won the last 2 years. I mean, the competition is in our own town… we have to win. It was fun though, even if I had to get up at 7am on a Saturday.

Later that day I met up with alot of friends (the Stevens, KC, Kate, Kris, Cameron), had wings at Applebee’s and watched the stupidest horror movie on Earth. It was so predictable and bad we laughed at alot of it.

I have not had alot of time to be online much lately, between school, work, and friends. I hope that will change soon… lately it feels like I have way too much stress even though I really don’t have anything to really stress about. I really hope that will change soon. We do have a nice long weekend coming up…

School’s tomorrow, so I’m off to do a few pages of homework (maybe).

First Band Performance, Work Update

I’ve been really busy lately with school, work, and band. On Saturday the Carbondale Marching Terriers had our first and second competition on the same day in O’Fallon and Belleville, Illinois (near St. Louis). We didn’t do as great as we hoped; nevertheless, we were able to beat Marion, a local rival, in both competitions. The other bands besides Marion and us were perdominately from the St. Louis area and therefore very big and well-funded. Most of them used semis to transport their stuff to the event, we just used a relatively small delivery truck.

Historicially, our band doesn’t do too well in the first couple of performances; then we begin to do very well after the newcomers to the band have lost their nervousness and major problems have been addressed. I’m anxious to see how well we will do next time.

For an example of just how big some of these bands are, here’s a picture of a band from around St. Louis performing at our first competition (this picture was taken from the rear of the field):

Image Hosted by ImageShack.us

If you look near the rear of the field you can plainly see the generator and orange power cable that powered their amps, speakers, and other audio equipment they needed for their pit! Crazy.

For some pictures of our band (as usual, not alot of drumline pictures are up) you can visit the official site’s picture gallery.

At work, we finished moving to the new building on Friday. It went suprisingly well given not too many problems have come up, at least not yet. The server room and our office is a mess, I’ll be able to get pictures after all the dust settles. It’s really nice though.

I’m really tired, so I’m off to get some sleep.

Published
Categorized as Band, Work

Band, Steak n’ Shake, Server Move

On Friday we had another field show exhibition at a home football game. It went alot better than last week but we still have work to do… on Tuesday we have Media Night where we perform a exhibition of our show, Mask of Zorro, for anyone interested. We invite the media in particular; thus the name Media Night, but anyone can come. If you haven’t seen our show yet you should check it out at 7pm at the CCHS football field.

After the show Friday I went to Steak n’ Shake… had a good time with friends. They have the best milkshakes around. Here’s me with my buddy Caitlyn:
Caitlyn and Me

Yesterday I had to go to work to assist migrating all of the servers where I work from our old building to the new one across the street. The situation at the old building was getting bad because we were running out of room, espicially in the server room. Observe the horror that is our old server room:
Old Building Server Room
Yikes. The lack of cable management makes this a nightmare to work in. Note the cheap K-Mart fans which help keep the servers cool.

Today, shortly before we started physicially moving servers, I managed to snap this shot of the new server room:
Unfinished New Building Server Room

Visible are the mostly empty racks, patch panels, and switches. By the time I left around 11:45, these racks were filled with about 25% of the servers from the old building. I would have stayed, but due to local curfew laws I can’t drive home after midnight. Which sucked because I am getting great on-the-job experience in setting up a datacenter from scratch… not many people my age can say that. As I write this the rest of the staff there (5 others) were still racking up servers… the rest won’t leave until it’s all done. By sunrise about 99% of our servers will be in the new building.

My department will probably move to the new building on Monday, and I’ll get some pictures of the new finished server room when it’s all done.