Unit tests

From SLIS Second Life Wiki

Revision as of 14:22, 10 January 2008 by Peter Bloomfield (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search
This Sloodle article needs to be updated, so it may no longer be accurate. You could help by updating it.


Provisionally, we are putting together a set of automated tests under the sloodle_tests directory. (This isn't included in a normal sloodle checkout)

You can checkout the sloodle tests into your modules directory with:

  svn checkout https://anon@sloodle.googlecode.com/svn/trunk/sloodle_tests


This uses the PHP SimpleTest framework.

TODO: Moodle already uses SimpleTest - we should really figure out how they arrange things, and do it the same way.

Currently, these are mostly HTTP accesses simulating the requests Second Life objects would send to the web server.

Contents

Test data

We will need the following test data in the database of the test installation. Provisionally, I'm putting a test installation at http://test.moodlefarm.socialminds.jp

As we create functionlity in Sloodle using more data, we will need to create more test data.

Courses

  • c1 "Course Test 1" (allow students to enrol themselves)
  • c2 "Course Test 2" (do not students to enrol themselves)

Users

  • admin1 Admin1first Admin1last (c1,c2)
  • admin2 Admin2first Admin2last ()
  • t1 Teacher1first Teacher1last (c1)
  • t2 Teacher2first Teacher2last (c1,c2)
  • t3 Teacher3first Teacher3last ()
  • s1 Student1first Student1last (c1)
  • s2 Student2first Student2last (c1,c2)
  • s3 Student3first Student3last ()

Quizzes

  • q1 "Quiz Test 1" (c1)
  • q2 "Quiz Test 2" (c1)
  • q3 "Quiz Test 3" (c2)

Chatrooms

  • ch1 "Chatroom Test 1" (c1)
  • ch2 "Chatroom Test 2" (c1)
  • ch3 "Chatroom Test 3" (c2)

Configuring the tests

The details of test users, prim passwords etc. are set in sloodle_tests/config.php.

When this is done, I'll make available a database dump that will allow you to setup a sloodle installation with the appropriate dummy data so that you can run the tests.

TODO: It would be better to have the test suite create all the dummy data itself, then clean up when it's done...


Edmund Edgar, 2007-04-16


This page is part of the Sloodle documentation
SloodleDocs Home | User Documentation | Administrator Documentation | Developer Documentation | Sloodle Wiki Home