2

I'm new to a lot of things that YETI requires to run, and I've made it through most of the steps to get it to work. I have installed cygwin so I can run node.js and npm (I used these instructions). Once done, I ran npm install yeti, and yeti installed. Now I can type things like this:

enter image description here

This is where I'm having problems. I can't figure out how to get yeti to run the tests in demo.html. I can open up my browser to file:///C:/test/demo.html and I can see the tests run (it's a YUI Test) so I know that the problem is not demo.html being broken. Also, when I try to run yeti as a server (yeti --server), It sits there after the line "to run and report the results" and doesn't let me do anything unless I exit with ctrl-c, although I can go to localhost:8000 and see this:

enter image description here

If I try opening up a new cygwin console and doing this:

enter image description here

It gives me a bunch of errors that I don't understand.

Help!

JustcallmeDrago
  • 1,885
  • 1
  • 13
  • 23
  • 1
    You might not like my answer but why don't you just install ubuntu(or any linux distro you) inside [virtualbox](http://www.virtualbox.org/). Then you have all the sheer power of linux inside windows! I think this tutorial might help you install ubuntu inside windows => http://www.psychocats.net/ubuntu/virtualbox or maybe this video => http://www.youtube.com/watch?v=n5ravk1H6DM – Alfred Jan 28 '11 at 23:28
  • did you try: npm install yeti@stable ? – generalhenry Jan 28 '11 at 23:52
  • @Alfred: I'm watching the video right now. I like it so far. I've never installed a linux-anything or even a virtual machine, so how much will I have to use in ubuntu? Meaning, can I still develop in Windows, do I have to have my files I'm testing on virtualbox's partition, or run my browser in ubuntu, etc? – JustcallmeDrago Jan 29 '11 at 00:01
  • in Ubuntu you'll just need to use the terminal, you can set up the virtual box to have it's IP accessible in windows for testing. (Though Ubuntu does run firefox and chrome) – generalhenry Jan 29 '11 at 00:08
  • also I see you're using node v0.3.1, you might try running node v0.2.6 it's a lot more stable on cygwin – generalhenry Jan 29 '11 at 00:10
  • @henry: I just tried `npm install yeti@stable` and it moved it back to a version that had a bug in it (I remember reading about it but can't find it again) so I re-installed yeti without @stable. I'm trying node v0.2.6 now – JustcallmeDrago Jan 29 '11 at 00:16
  • @GeneralHenry you can decide what you want to run where. You can shre files between VM and XP. But I guarantee you that you will do all your webdevelopment in VM soon ;). After that you will install ubuntu as dual-boot to get even more speed. Because VM is cool and will work for webdevelopment, but native it will even smoother :P – Alfred Jan 29 '11 at 00:24
  • @JustcallmeDrago thanks for yeti :P. I justed test it on ubuntu and it is pretty awesome :P. I will post how i did it real soon :P – Alfred Jan 29 '11 at 00:47
  • Wow, awesome! Because I've given up on trying cygwin, so thanks for that. Here I come ubuntu! (after 700 MB of downloading that is) – JustcallmeDrago Jan 29 '11 at 01:13
  • @justcallmeDrago :). That takes about 30 minutes at top to download if you got a decent connection. I can download it in a couple of minutes :P. P.S: I am available for chat a little longer inside http://stackoverflow.speeqe.com/, but should go to bed soon. Almost 3:00 am :P oops – Alfred Jan 29 '11 at 01:38

1 Answers1

2

How I did it on ubuntu:

  • First install node dependencies. Only install dependencies using apt-get

  • Next install node/npm the correct way on ubuntu.

    echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
    . ~/.bashrc
    mkdir ~/local
    mkdir ~/node-latest-install
    cd ~/node-latest-install
    curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
    ./configure --prefix=~/local
    make install # ok, fine, this step probably takes more than 30 seconds...

close terminal and open it again

curl http://npmjs.org/install.sh | sh
  • After that install yeti issuing: $ npm install yeti@stable
  • Run yeti issuing from terminal:

    alfred@alfred-laptop:~/node/stackoverflow/4833633$ yeti Yeti will only serve files inside /home/alfred/node/stackoverflow/4833633 Visit http://localhost:8000, then run: yeti to run and report the results.

  • start the browsers you like. Point the browsers to => http://localhost:8000

  • inside the folder you started yeti write your tests.

    alfred@alfred-laptop:~/node/stackoverflow/4833633$ ls -al
    total 16
    drwxr-xr-x 2 alfred alfred 4096 2011-01-29 01:47 .
    drwxr-xr-x 6 alfred alfred 4096 2011-01-29 01:27 ..
    -rw-r--r-- 1 alfred alfred 6140 2011-01-29 01:47 simple.html

    See gist for a really simple example. I just copied to example from http://developer.yahoo.com/yui/3/examples/test/test-simple-example_clean.html but removed the <!--MyBlogLog instrumentation--> crap. I also told it not to render console by commenting line 196 => //r.render('#testLogger');(That last is not even necessary, but I think tests will run faster that way because it does need to render the console).

  • Finally I just ran:

alfred@alfred-laptop:~/node/stackoverflow/4833633$ yeti simple.html
Waiting for results. When you're done, hit Ctrl-C to exit.
✔ Example Suite on Chrome (8.0.552.237) / Linux
   6 passed, 0 failed

✔ Example Suite on Firefox (3.6.13) / Linux
   6 passed, 0 failed

Success :)

Some extra information about my distro

alfred@alfred-laptop:~/node/stackoverflow/4833633$ cat /etc/issue
Ubuntu 10.10 \n \l

alfred@alfred-laptop:~/node/stackoverflow/4833633$ python --version
Python 2.6.6

alfred@alfred-laptop:~/node/stackoverflow/4833633$ node -v
v0.2.6

alfred@alfred-laptop:~/node/stackoverflow/4833633$ npm -v
0.2.15

alfred@alfred-laptop:~/node/stackoverflow/4833633$ npm ls installed | grep yeti
npm info it worked if it ends with ok
npm info using npm@0.2.15
npm info using node@v0.2.6
yeti@0.1.2               The YUI Easy Testing Interface    =reid active installed remote stable YUI web app YUITest TDD BDD yui3 test
npm ok
Alfred
  • 60,935
  • 33
  • 147
  • 186