All approved students will be asked to keep track of the pertinent details about their project in a central wiki page on this group. The following is a template for them to use to do this.
Project information
Project page on drupal.org: http://drupal.org/project/bot (original module, customizations are going to be placed into sandbox)
Student: Balazs Dianiska (snufkin on d.o, snufkin@drupal.org on g.d.o)
Mentor: Morbus (Morbus)
Co-mentor: dmitrig01 (dmitrig01)
Current status: Working on setting up PHP IRCd for automated connection and other unit testing for the bot.
Description
Bot module is a Drupal PHP IRC bot written by Morbus Iff. It runs on many Drupal related channels, providing various tools from code documentation to collaboration between users. It utilizes the CMS as its storage and code handling back-end, but until now not many public modules exploit the potential in this website - IRC interaction, interacting with Drupal content, site users for instance. This project will extend its core in this direction, and by writing tests and documentation for it will make further contribution easier.
Project schedule
-
May 23: Community Bonding Period
Fax my Student Foreign Certification and Proof of Enrollment to GoogleObtain CVS account on drupal.orgIRC/VoIP meeting with mentors- Refine scope and timeline
- Create issues for first milestone in the d.o project, linked below
-
9 June
Opened a cvs repository for the bot tests
-
16 June
Setting up test environment (pnctl, sockets.so)Successful unit testing for forking (mock.test)
Plan:
This all setup and socket within simpletest took so long to figure out and test out, that I am behind with schedule. My first priority now is to finish the core tests, then move on to the new modules as soon as possible, authentication, bot op and the aggregator.
9 June
With agreement with Morbus I commit my initial tests into my sandbox here on drupal.org.
16 June
Successfully built up a socket based mock test of a ClientTestCase and a ServerTestCase, communicating to each other. I'll use this architecture with the php irc server to assert client connections and messages for the bot. The testing environment will need pnctl and sockets compiled into the PHP. First is needed for the parallel running of tests, the second for the actual irc server implementation.
28 June
Not much progress due to some other occupation, but I still managed to start clearing up the testing code, made an IRC server and a bot client testcase. These will be the base testcases that all module tests will need to extend. Also the mock tests namespace is isolated now.
The next interesting task will be to connect the bot to the server (this is likely easy), and to have an assertion for the connection status.
4th July
After a lot of painful trials and errors I realized what stopped the server from parsing the bot's messages whats that it sent the messages too quickly. Probably due to the simpletest environment the code was unable process the incoming packets (I will need to double check this on another machine). I added some delays and timeouts by hand, with this although it still not 100% sure that all packets are captured, it does happen. I wrote a simple test for the bot logger module, this will be the first test of extending the base bot test classes for an actual test. So far it initiates the bot twice, i am looking into it why.
Notes
To run tests one needs to use --concurrency 2 flag and run the Bot test package (or running all tests). The simpletest supplied script distributes classes to run parallel, so one bot .test file should only contain two tests, one for the server and one for the client, otherwise they might not run the same time.
