mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Add selenium tests
This commit is contained in:
parent
21d233cd72
commit
6e0b42afb1
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file test/AdherentTest.php
|
||||
* \file test/phpunit/AdherentTest.php
|
||||
* \ingroup test
|
||||
* \brief This file is an example for a PHPUnit test
|
||||
* \version $Id$
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
global $conf,$user,$langs,$db;
|
||||
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
|
||||
require_once 'PHPUnit/Framework.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/adherents/class/adherent.class.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/adherents/class/adherent.class.php';
|
||||
|
||||
if (empty($user->id))
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file test/BuildDocTest.php
|
||||
* \file test/phpunit/BuildDocTest.php
|
||||
* \ingroup test
|
||||
* \brief This file is an example for a PHPUnit test
|
||||
* \version $Id$
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
global $conf,$user,$langs,$db;
|
||||
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
|
||||
require_once 'PHPUnit/Framework.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/compta/facture/class/facture.class.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php';
|
||||
|
||||
if (empty($user->id))
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file test/CommandeTest.php
|
||||
* \file test/phpunit/CommandeTest.php
|
||||
* \ingroup test
|
||||
* \brief This file is an example for a PHPUnit test
|
||||
* \version $Id$
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
global $conf,$user,$langs,$db;
|
||||
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
|
||||
require_once 'PHPUnit/Framework.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/commande/class/commande.class.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/commande/class/commande.class.php';
|
||||
|
||||
if (empty($user->id))
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file test/CommonObjectTest.php
|
||||
* \file test/phpunit/CommonObjectTest.php
|
||||
* \ingroup test
|
||||
* \brief This file is an example for a PHPUnit test
|
||||
* \version $Id$
|
||||
|
|
@ -27,9 +27,9 @@
|
|||
global $conf,$user,$langs,$db;
|
||||
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
|
||||
require_once 'PHPUnit/Framework.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/commande/class/commande.class.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/projet/class/project.class.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/commande/class/commande.class.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/projet/class/project.class.php';
|
||||
|
||||
if (empty($user->id))
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file test/CompanyBankAccount.php
|
||||
* \file test/phpunit/CompanyBankAccount.php
|
||||
* \ingroup test
|
||||
* \brief This file is an example for a PHPUnit test
|
||||
* \version $Id$
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
global $conf,$user,$langs,$db;
|
||||
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
|
||||
require_once 'PHPUnit/Framework.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/societe/class/companybankaccount.class.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/societe/class/companybankaccount.class.php';
|
||||
|
||||
if (empty($user->id))
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file test/ContratTest.php
|
||||
* \file test/phpunit/ContratTest.php
|
||||
* \ingroup test
|
||||
* \brief This file is an example for a PHPUnit test
|
||||
* \version $Id$
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
global $conf,$user,$langs,$db;
|
||||
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
|
||||
require_once 'PHPUnit/Framework.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/contrat/class/contrat.class.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/contrat/class/contrat.class.php';
|
||||
|
||||
if (empty($user->id))
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file test/DateLibTest.php
|
||||
* \file test/phpunit/DateLibTest.php
|
||||
* \ingroup test
|
||||
* \brief This file is an example for a PHPUnit test
|
||||
* \version $Id$
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
global $conf,$user,$langs,$db;
|
||||
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
|
||||
require_once 'PHPUnit/Framework.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/lib/date.lib.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/lib/date.lib.php';
|
||||
|
||||
if (empty($user->id))
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file test/FactureTest.php
|
||||
* \file test/phpunit/FactureTest.php
|
||||
* \ingroup test
|
||||
* \brief This file is an example for a PHPUnit test
|
||||
* \version $Id$
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
global $conf,$user,$langs,$db;
|
||||
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
|
||||
require_once 'PHPUnit/Framework.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/compta/facture/class/facture.class.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/compta/facture/class/facture.class.php';
|
||||
|
||||
if (empty($user->id))
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file test/MyTestSuite.php
|
||||
* \file test/phpunit/MyTestSuite.php
|
||||
* \ingroup test
|
||||
* \brief This file is a test suite to run all unit tests
|
||||
* \version $Id$
|
||||
|
|
@ -29,7 +29,7 @@ print "Memory: ". ini_get('memory_limit')."\n";
|
|||
global $conf,$user,$langs,$db;
|
||||
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
|
||||
require_once 'PHPUnit/Framework.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
|
||||
if (empty($user->id))
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file test/PropalTest.php
|
||||
* \file test/phpunit/PropalTest.php
|
||||
* \ingroup test
|
||||
* \brief This file is an example for a PHPUnit test
|
||||
* \version $Id$
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
global $conf,$user,$langs,$db;
|
||||
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
|
||||
require_once 'PHPUnit/Framework.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/comm/propal/class/propal.class.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/comm/propal/class/propal.class.php';
|
||||
|
||||
if (empty($user->id))
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file test/UserGroupTest.php
|
||||
* \file test/phpunit/UserGroupTest.php
|
||||
* \ingroup test
|
||||
* \brief This file is an example for a PHPUnit test
|
||||
* \version $Id$
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
global $conf,$user,$langs,$db;
|
||||
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
|
||||
require_once 'PHPUnit/Framework.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/user/class/usergroup.class.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/user/class/usergroup.class.php';
|
||||
|
||||
if (empty($user->id))
|
||||
{
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file test/UserTest.php
|
||||
* \file test/phpunit/UserTest.php
|
||||
* \ingroup test
|
||||
* \brief This file is an example for a PHPUnit test
|
||||
* \version $Id$
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
global $conf,$user,$langs,$db;
|
||||
//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver
|
||||
require_once 'PHPUnit/Framework.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../htdocs/user/class/user.class.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
||||
require_once dirname(__FILE__).'/../../htdocs/user/class/user.class.php';
|
||||
|
||||
if (empty($user->id))
|
||||
{
|
||||
67
test/selenium/test_thirdparty.xml
Normal file
67
test/selenium/test_thirdparty.xml
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link rel="selenium.base" href="" />
|
||||
<title>Création tiers (UCTP01)</title>
|
||||
</head>
|
||||
<body>
|
||||
<table cellpadding="1" cellspacing="1" border="1">
|
||||
<thead>
|
||||
<tr><td rowspan="1" colspan="3">Création tiers (UCTP01)</td></tr>
|
||||
</thead><tbody>
|
||||
<tr>
|
||||
<td>open</td>
|
||||
<td>/dolibarrnew/fourn/fiche.php?socid=14</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>clickAndWait</td>
|
||||
<td>//a[@id='mainmenua_companies']/span</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>clickAndWait</td>
|
||||
<td>link=Nouveau tiers</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>nom</td>
|
||||
<td>SeleThirdParty2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>selectAndWait</td>
|
||||
<td>pays_id</td>
|
||||
<td>label=FR - France</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>select</td>
|
||||
<td>departement_id</td>
|
||||
<td>label=01 - Ain</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>cp</td>
|
||||
<td>59500</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>type</td>
|
||||
<td>ville</td>
|
||||
<td>ville</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>select</td>
|
||||
<td>default_lang</td>
|
||||
<td>label=Français</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>clickAndWait</td>
|
||||
<td>//input[@value='Créer tiers']</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
</tbody></table>
|
||||
</body>
|
||||
</html>
|
||||
14
test/selenium/testsuite_thirdparty.xml
Normal file
14
test/selenium/testsuite_thirdparty.xml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
|
||||
<title>Test Suite</title>
|
||||
</head>
|
||||
<body>
|
||||
<table id="suiteTable" cellpadding="1" cellspacing="1" border="1" class="selenium"><tbody>
|
||||
<tr><td><b>Test Suite</b></td></tr>
|
||||
<tr><td><a href="test_thirdparty.xml">test_thirdparty</a></td></tr>
|
||||
</tbody></table>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue
Block a user