#!/usr/bin/php -q <?php /* * Test ID: JBX_21 * Description: Call a JabbeX function with an invalid string parameter. * Pre-conditions: * - None * * Post-Conditions * - Throws exception ("Invalid string parameter.",3002) */ require_once "../../Jabbex.php"; $jabbex = new Jabbex("35715928654"); $jabbex->_jabber_connect(); $jabbex->create_muc_room(" ", " ", "blahasodnud", "daniel");
#!/usr/local/bin/php -q <?php /* * Test ID: JBX_06 * Test description: This test creates a MUC room named stubroom. * Pre-conditions: * 1 - Jabbex must be properly configured to use your Jabber server; * 2 - The room stubroom must NOT exist; * 3 - The default Jabbex JID must have permission to create a MUC room; * 4 - No other connection of the default JID that uses resource res_3271989 must be active. * 5 - The user "bbking" must exist in the server. * * Post-conditions: * 1 - The room stubroom is created with the name "My Stub Room (Room Name)" * and the description "Here I put the description of my room (Projetc short description)" (no error or warning messages must be printed). * 2 - The default JabbeX JID must be set as room owner and the user bbking must be set as room admin. * 3 - Jabbex closes the connection to the Jabber server. */ require_once "../Jabbex.php"; $jabex = new Jabbex("res_3271989"); $jabex->create_muc_room("stubroom", "My Stub Room (Room Name)", "Here I put the description of my room (Projetc short description)", "bbking");
* projet qui mappe le salon de discution à rendre inaccessible. * 3 - le $user admin ici doit exister en tant que administrateur des projets correspondants qui existent déjà dans codendi. * Post-conditions: * 1 - les muc rooms unix-nameperf-test0,unix-nameperf-test1, unix-nameperf-test2 et unix-nameperf-test3 sont créés ainsi que les groupes partagés correspondants .avec les temps suivants : * ->temps mis apres appel numéro 1 : 10.859273910522 s * ->temps mis apres appel numéro 2 : 6.793231010437 s * ->temps mis apres appel numéro 3 : 6.5583012104034 s * ->temps mis apres appel numéro 4 : 7.0762600898743 s * -> Ce qui donne un temps total :31.287104129791 s * Pour confirmer les résultats on peut se rendre à l'url suivant (http://kilauea.grenoble.xrce.xerox.com:8017/plugins/IM/?view=codendi_im_admin ) ,avant et aprés l'exécution de ce script . */ require_once "../include/jabbex_api/Jabbex.php"; $jabex = new Jabbex("res_3271989"); $unix_name = "unix-nameperf-test"; $name = "name-perf-test"; $desc = "desc-perftest"; $user = "******"; $begin = microtime(true); $deb = $begin; $time = 0; echo '\\n\\nDébut : ' . $begin; for ($i = 0; $i < 4; $i++) { //create_muc_room($muc_room_short_name, $muc_room_full_name, $muc_room_description, $muc_room_owner_username) $jabex->create_muc_room($unix_name . $i, $name . $i, $desc . $i, $user); $jabex->create_shared_group($unix_name . $i, $name . $i); $time = microtime(true) - $deb; $deb = microtime(true); print '\\n\\n\\n temps mis apres appel numéro ' . ($i + 1) . ' : ' . $time; } $end = microtime(true) - $begin; print "\n\n\ntemps total :" . $end . "\n";
#!/usr/local/bin/php -q <?php /* * Test ID: JBX_09 * Test description: This test creates a MUC room and a shared group named "Crossing Alabama". * Pre-conditions: * 1 - Jabbex must be properly configured to use your Jabber server; * 2 - The room id xingalab must NOT exist; * 3 - The default Jabbex JID must have permission to create a MUC room; * 4 - No other connection of the default JID that uses resource res_398671989 must be active. * 5 - The user "bbking" must exist in the server. * 6 - The project id xingalab must exist in the Codendi environment; * 7 - The default Jabbex JID must have permission to create a shared group with the Helga plugin; * 8 - The Helga plugin must be installed and JabbeX must be configured to properly use it; * Post-conditions: * 1 - The room xingalab is created with the name "Crossing Alabama" * and the description "Here I put the description of my room (Projetc short description)" (no error or warning messages must be printed). * 2 - The default JabbeX JID must be set as room owner and the user bbking must be set as room admin. * 3 - The shared group corresponding to the project stub is set as "shared" with the name "Crossing Alabama"; * 4 - Jabbex closes the connection to the Jabber server. */ require_once "../Jabbex.php"; $jabex = new Jabbex("res_398671989"); $jabex->create_shared_group("xingalab", "Crossing Alabama"); $jabex->create_muc_room("xingalab", "Crossing Alabama", "Here I put the description of my room (Projetc short description)", "bbking");