Erlang/OTP Forums

Author Message

<  Advanced Erlang/OTP  ~  Erlang Test Server

tobbe
Posted: Tue Aug 29, 2006 9:54 am Reply with quote
User Joined: 19 Jan 2005 Posts: 274 Location: Stockholm, Sweden
Has anyone used the Erlang Test Server that can be found at:

http://www.erlang.org/project/test_server/

If so how have you set it up ?

The documentation follows good'ol OTP standard (i.e terse and cumbersome).
Perhaps a little HowTo, showing how to make practical use of it, would be
a good idea.

For example, if I have my system laid out like: X/lib/<app>/src, X/lib/<app>/ebin, X/lib/<app>/test , etc... Now it is easy to put my xxx_SUITE.erl files in the various
test directories, and write a little shellscript that moves them into a separate
testroot dir where the ETS (Erlang Test Server) lives.

My system is started as X/bin/start.sh.

Now, how can I get the ETS to execute the testcases in my system node ?

Cheers, Tobbe
View user's profile Send private message Send e-mail Visit poster's website
patrik
Posted: Tue Aug 29, 2006 11:14 am Reply with quote
Joined: 29 Aug 2006 Posts: 4
Take a look at

http://erlang.org/project/test_server/README

Then download the stdlib example test suite:

http://erlang.org/download/test_server/stdlib-test-2004-05-26.tar.gz

Copy/paste/edit the stdlib.spec file to suite your tested application and copy/paste/edit the makefile.

Unpack the test_server stuff

http://erlang.org/download/test_server/test_server-3.1.1.tar.gz

in TEST_DIR and

make release_tests TESTROOT=TEST_DIR

in your test suite directories.

Then goto your unpacked test server and start an erlang shell and do

ts:install().

ts:run().

to run all your tests. For starters you could try running the stdlib one.

Cheers

/Patrik.


Last edited by patrik on Tue Aug 29, 2006 11:45 am; edited 1 time in total
View user's profile Send private message Send e-mail
tobbe
Posted: Tue Aug 29, 2006 11:35 am Reply with quote
User Joined: 19 Jan 2005 Posts: 274 Location: Stockholm, Sweden
I have followed the README and I have successfully been running the stdlib test suite. But I want to run the test cases in my system (node).

So I have the test_server installed as:
Code:

 testroot/test_server

then I have produced my own test suite to be put at:
Code:

 testroot/site_test

from the testroot/test_server directory I start my system in interactive mode:
Code:

 some-path-here/bin/start -i

From the Erlang shell I then run:
Code:

 ts:install().
 ts:tests().   % returns: [site]
 ts:run(site).

The last command (ts:run/1) starts a new node and tries to call my test cases.
So either I want to have ts:run/ to run in my system node or I want to tell the
new node to do rpc'c to my system node. So how can I do this ?

--Tobbe
View user's profile Send private message Send e-mail Visit poster's website
patrik
Posted: Tue Aug 29, 2006 11:56 am Reply with quote
Joined: 29 Aug 2006 Posts: 4
If you want to run your test code in a system node, I guess you could have a test suite 'start' clause start your system up and the subsequent cases run your tests - but that would maybe change the system too much to be possible?

I use the test server for blackbox testing, where I have a number of emulators to provide input to the tested system.
View user's profile Send private message Send e-mail
rvg
Posted: Tue Aug 29, 2006 12:32 pm Reply with quote
User Joined: 29 Aug 2006 Posts: 27
Test server cannot (AFAIK) test embedded releases (started with a boot script). We modified it so that you can pass it a specific set of boot parameters and then test against that running release
View user's profile Send private message Visit poster's website
tobbe
Posted: Tue Aug 29, 2006 1:45 pm Reply with quote
User Joined: 19 Jan 2005 Posts: 274 Location: Stockholm, Sweden
Ok, I thought there were some clever ways of configuring the test server that I could do.

If any OTP people is reading this: would it be ok to put the Test Server in jungerl if I make some enhancements of general interest to it ?

--Tobbe
View user's profile Send private message Send e-mail Visit poster's website

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum