Skip to content

Commit

Permalink
Updated test script to support running against multiple instances. Yo…
Browse files Browse the repository at this point in the history
…u just create new RavenDb_{Name} folders and it will run the tests against every instance.

This is used to test against multiple versions or configurations.
  • Loading branch information
Chris Sainty committed Dec 15, 2011
1 parent 18c43f0 commit c5014d5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ npm install jshint

These dependencies are in the package.json, so you can just _npm install_ to get them all.

The test.cmd script assumes a dedicated ravendb instance is sitting in the .\RavenDb folder.
It will delete the data folder, start and stop the server for each run of the tests.
The test.cmd script assumes a dedicated RavenDb instance is sitting in the _.\RavenDb_ folder.
It will delete the data folder, start and stop the server for each run of the tests.
You can test against multiple RavenDb versions or configurations by createing additional folders in the format _.\RavenDb_{Name}_, the test script will run the tests against the RavenDb instance in each folder.

Since there is no auth support yet, please change the following setting (from it's default Get) in Raven.Server.config

Expand All @@ -39,4 +40,5 @@ NodeJs - http://nodejs.org
Should - https://github.com/visionmedia/should.js
Request - https://github.com/mikeal/request
Mocha - http://visionmedia.github.com/mocha/
Jshint - https://github.com/jshint/node-jshint
Jshint - https://github.com/jshint/node-jshint
Chris Sainty - http://csainty.blogspot.com - @csainty
26 changes: 14 additions & 12 deletions test.cmd
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
@echo off
del /q /s .\Ravendb\data > NUL
del /q /s .\Ravendb\logs > NUL
start "node-raven-test-server" /MIN .\RavenDb\Raven.Server
node .\test\waitforserver.js

echo ---
echo Test results
echo ---
cmd /C .\node_modules\.bin\mocha .\test\ravenhttpclient.test.js .\test\HiLoKeyGenerator.test.js .\test\client.test.js
taskkill /F /FI "WINDOWTITLE eq node-raven-test-server" > NUL
FOR /D %%f IN (RavenDb*) DO CALL :test %%f

echo ---
echo JShint results
echo ---
echo.---JShint results---
cmd /C .\node_modules\.bin\jshint .\lib\client.js .\lib\ravenhttpclient.js .\lib\HiLoKeyGenerator.js

GOTO :EOF

:test
@ECHO.Testing %1
del /q /s .\%1\data > NUL
del /q /s .\%1\logs > NUL
start "node-raven-test-server" /MIN .\%1\Raven.Server
node .\test\waitforserver.js

echo.---Test results for %1---
cmd /C .\node_modules\.bin\mocha .\test\ravenhttpclient.test.js .\test\HiLoKeyGenerator.test.js .\test\client.test.js
taskkill /F /FI "WINDOWTITLE eq node-raven-test-server" > NUL

0 comments on commit c5014d5

Please sign in to comment.