test phpunit + behat

This commit is contained in:
odain
2020-07-16 15:44:47 +02:00
parent 8c3417adeb
commit 6bdfdad09f
22 changed files with 141 additions and 1 deletions

View File

@@ -5,4 +5,11 @@ itop_backup=test/backups/backup-itop.tar.gz
[phpunit]
; when empty phpunit_xml => no phpunit test performed
; phpunit xml file description. required for phpunit testing
phpunit_xml=test/phpunit.xml.dist
phpunit_xml=test/phpunit.xml.dist
phpunit_suite[]=Status
phpunit_suite[]=Tickets
behat_feature_test[]=test/features/debug-ci.feature
behat_feature_test[]=test/features/debug-ci.feature
behat_csv_folder[]=test/csv-data/default

View File

@@ -0,0 +1,6 @@
name;code;status;parent_id->name
IT Special;IT;active;IT Department
Client Special;;active;
Demo;;active;
IT Department;IT;active;
My Company/Department;SOMECODE;active;
1 name code status parent_id->name
2 IT Special IT active IT Department
3 Client Special active
4 Demo active
5 IT Department IT active
6 My Company/Department SOMECODE active

View File

@@ -0,0 +1,9 @@
first_name;name;org_id->name;status;email;phone;notify;function;manager_id->email
Config;Manager;IT Department;active;config.quality@combodo.com;;yes;ConfigManager qui voit tout;
Config;Special;IT Special;active;config-special.quality@combodo.com;+33 01 23 45 67 89;yes;ConfigManager limité à son org et son client;
Power;Portal;Demo;active;power.quality@combodo.com;;yes;power utilisateur portail, sans allowed org;config.quality@combodo.com
Power;Special;Client Special;active;power-special.quality@combodo.com;+33 01 23 45 67 89;yes;power utilisateur portail, limité à son org;config-special.quality@combodo.com
Agent;Standard;IT Department;active;agent-special.quality@combodo.com;;yes;agent de support standard qui voit tout;config.quality@combodo.com
Agent;Special;IT Special;active;agent.quality@combodo.com;+33 01 23 45 67 89;yes;agent de support limité à son org et son client;config-special.quality@combodo.com
Portal;Generic;Demo;active;portal.quality@combodo.com;;yes;utilisateur portail, sans allowed org;power.quality@combodo.com
Portal;Special;Client Special;active;portal-special.quality@combodo.com;+33 01 23 45 67 89;yes;utilisateur portail, limité à son org;power-special.quality@combodo.com
1 first_name name org_id->name status email phone notify function manager_id->email
2 Config Manager IT Department active config.quality@combodo.com yes ConfigManager qui voit tout
3 Config Special IT Special active config-special.quality@combodo.com +33 01 23 45 67 89 yes ConfigManager limité à son org et son client
4 Power Portal Demo active power.quality@combodo.com yes power utilisateur portail, sans allowed org config.quality@combodo.com
5 Power Special Client Special active power-special.quality@combodo.com +33 01 23 45 67 89 yes power utilisateur portail, limité à son org config-special.quality@combodo.com
6 Agent Standard IT Department active agent-special.quality@combodo.com yes agent de support standard qui voit tout config.quality@combodo.com
7 Agent Special IT Special active agent.quality@combodo.com +33 01 23 45 67 89 yes agent de support limité à son org et son client config-special.quality@combodo.com
8 Portal Generic Demo active portal.quality@combodo.com yes utilisateur portail, sans allowed org power.quality@combodo.com
9 Portal Special Client Special active portal-special.quality@combodo.com +33 01 23 45 67 89 yes utilisateur portail, limité à son org power-special.quality@combodo.com

View File

@@ -0,0 +1,9 @@
login;password;contactid->org_name;contactid->first_name;contactid->name;status;language;profile_list;allowed_org_list
agent;agent;IT Department;Agent;Standard;enabled;EN US;profileid->name:Support Agent;
config;config;IT Department;Config;Manager;enabled;FR FR;profileid->name:Configuration Manager;
portal;portal;Demo;Portal;Generic;enabled;EN US;profileid->name:Portal user;
power;power;Demo;Power;Portal;enabled;EN US;profileid->name:Portal user|profileid->name:Portal power user;
agent2;agent2;IT Special;Agent;Special;enabled;FR FR;profileid->name:Support Agent;allowed_org_id->name:IT Special|allowed_org_id->name:Client Special
config2;config2;IT Special;Config;Special;enabled;EN US;profileid->name:Configuration Manager;allowed_org_id->name:IT Special|allowed_org_id->name:Client Special
portal2;portal2;Client Special;Portal;Special;enabled;FR FR;profileid->name:Portal user;allowed_org_id->name:Client Special
power2;power2;Client Special;Power;Special;enabled;FR FR;profileid->name:Portal user|profileid->name:Portal power user;allowed_org_id->name:Client Special
1 login password contactid->org_name contactid->first_name contactid->name status language profile_list allowed_org_list
2 agent agent IT Department Agent Standard enabled EN US profileid->name:Support Agent
3 config config IT Department Config Manager enabled FR FR profileid->name:Configuration Manager
4 portal portal Demo Portal Generic enabled EN US profileid->name:Portal user
5 power power Demo Power Portal enabled EN US profileid->name:Portal user|profileid->name:Portal power user
6 agent2 agent2 IT Special Agent Special enabled FR FR profileid->name:Support Agent allowed_org_id->name:IT Special|allowed_org_id->name:Client Special
7 config2 config2 IT Special Config Special enabled EN US profileid->name:Configuration Manager allowed_org_id->name:IT Special|allowed_org_id->name:Client Special
8 portal2 portal2 Client Special Portal Special enabled FR FR profileid->name:Portal user allowed_org_id->name:Client Special
9 power2 power2 Client Special Power Special enabled FR FR profileid->name:Portal user|profileid->name:Portal power user allowed_org_id->name:Client Special

View File

@@ -0,0 +1,2 @@
name;status;org_id->name;email;notify;persons_list
Firemen;active;IT Special;;yes;person_id->email:agent-special.quality@combodo.com|person_id->email:config-special.quality@combodo.com
1 name status org_id->name email notify persons_list
2 Firemen active IT Special yes person_id->email:agent-special.quality@combodo.com|person_id->email:config-special.quality@combodo.com

View File

@@ -0,0 +1,2 @@
name;org_id->name
Special support;IT Special
1 name org_id->name
2 Special support IT Special

View File

@@ -0,0 +1,2 @@
name;deliverymodel_id->name;deliverymodel_id->organization_name
Client Special;Special support;IT Special
1 name deliverymodel_id->name deliverymodel_id->organization_name
2 Client Special Special support IT Special

View File

@@ -0,0 +1,3 @@
deliverymodel_id;contact_id;role_id->name
2;26;Support level1
1 deliverymodel_id contact_id role_id->name
2 2 26 Support level1

View File

@@ -0,0 +1,2 @@
name;org_id->name;servicefamily_id->name;status
Service pour les Gaulois;IT Special;IT Services;production
1 name org_id->name servicefamily_id->name status
2 Service pour les Gaulois IT Special IT Services production

View File

@@ -0,0 +1,4 @@
name;status;org_id->name;start_date;provider_id->name;cost_currency
Contract Special;production;Client Special;2016-12-25;IT Special;euros
Contract Standard;implementation;Client Special;2016-01-31;IT Department;dollars
Contract Standard;production;Demo;;IT Department;
1 name status org_id->name start_date provider_id->name cost_currency
2 Contract Special production Client Special 2016-12-25 IT Special euros
3 Contract Standard implementation Client Special 2016-01-31 IT Department dollars
4 Contract Standard production Demo IT Department

View File

@@ -0,0 +1,2 @@
name;description
Business Hours;Monday to Friday 9h-12h + 14h-18h
1 name description
2 Business Hours Monday to Friday 9h-12h + 14h-18h

View File

@@ -0,0 +1,11 @@
coverage_window_id->name;weekday;start_time;end_time
Business Hours;friday;09:00;12:00
Business Hours;friday;14:00;18:00
Business Hours;monday;09:00;12:00
Business Hours;monday;14:00;18:00
Business Hours;thursday;09:00;12:00
Business Hours;thursday;14:00;18:00
Business Hours;tuesday;09:00;12:00
Business Hours;tuesday;14:00;18:00
Business Hours;wednesday;09:00;12:00
Business Hours;wednesday;14:00;18:00
1 coverage_window_id->name weekday start_time end_time
2 Business Hours friday 09:00 12:00
3 Business Hours friday 14:00 18:00
4 Business Hours monday 09:00 12:00
5 Business Hours monday 14:00 18:00
6 Business Hours thursday 09:00 12:00
7 Business Hours thursday 14:00 18:00
8 Business Hours tuesday 09:00 12:00
9 Business Hours tuesday 14:00 18:00
10 Business Hours wednesday 09:00 12:00
11 Business Hours wednesday 14:00 18:00

View File

@@ -0,0 +1,4 @@
customercontract_id->organization_name;customercontract_id->name;customercontract_id->provider_name;service_id->organization_name;service_id->name;sla_id->name;coveragewindow_id->name;sla_id->organization_name
Client Special;Contract Special;IT Special;IT Special;Service pour les Gaulois;;;
Client Special;Contract Standard;IT Department;IT Department;Computers and peripherals;Standard SLA;Business Hours;Demo
Demo;Contract Standard;IT Department;IT Department;Software;Standard SLA;;Demo
1 customercontract_id->organization_name customercontract_id->name customercontract_id->provider_name service_id->organization_name service_id->name sla_id->name coveragewindow_id->name sla_id->organization_name
2 Client Special Contract Special IT Special IT Special Service pour les Gaulois
3 Client Special Contract Standard IT Department IT Department Computers and peripherals Standard SLA Business Hours Demo
4 Demo Contract Standard IT Department IT Department Software Standard SLA Demo

View File

@@ -0,0 +1,2 @@
name;description;level1_rule;level1_timeout;level1_default_approval;level2_rule;level2_default_approval;level2_timeout;coveragewindow_id->name
Manager approval;;SELECT Person AS m JOIN Person AS e ON e.manager_id=m.id WHERE e.id=:this->caller_id;70;yes;;no;70;Business Hours
1 name description level1_rule level1_timeout level1_default_approval level2_rule level2_default_approval level2_timeout coveragewindow_id->name
2 Manager approval SELECT Person AS m JOIN Person AS e ON e.manager_id=m.id WHERE e.id=:this->caller_id 70 yes no 70 Business Hours

View File

@@ -0,0 +1,4 @@
name;service_id->name;status;request_type;description;service_id->organization_name;approvalrule_id->name
Coq au vin;Service pour les Gaulois;production;service_request;Un truc avec Request Template;IT special;Manager approval
Demande de congé;Service pour les Gaulois;production;service_request;Un truc qu'il faut faire approuver;IT special;
Préavis de grève;Service pour les Gaulois;production;incident;Un genre d'incident fréquent en France;IT special;
1 name service_id->name status request_type description service_id->organization_name approvalrule_id->name
2 Coq au vin Service pour les Gaulois production service_request Un truc avec Request Template IT special Manager approval
3 Demande de congé Service pour les Gaulois production service_request Un truc qu'il faut faire approuver IT special
4 Préavis de grève Service pour les Gaulois production incident Un genre d'incident fréquent en France IT special

View File

@@ -0,0 +1,3 @@
description;target_class;target_log
User Request public log update;UserRequest;public_log
User Request private log update;UserRequest;private_log
1 description target_class target_log
2 User Request public log update UserRequest public_log
3 User Request private log update UserRequest private_log

View File

@@ -0,0 +1,5 @@
name;to;status;subject;from;description;test_recipient;importance;body
Notification to caller on User Request public log update;SELECT Person WHERE id=:this->caller_id;enabled;The ticket $this->ref$ has been updated;test@combodo.com;This action informs a caller that the public log of a ticket has been updated;test@test.com;normal;"$this-&gt;head_html(public_log)$<br>
$this-&gt;hyperlink(portal)$"
Notification to agent on User Request private log update;SELECT Person WHERE id=:this->agent_id;enabled;Votre ticket $this->ref$ a été mis à jour;test@combodo.com;This action informs the agent that the private log of a ticket has been updated;test@test.com;normal;"<ul><li>$this-&gt;head_html(public_log)$</li><li>
$this-&gt;hyperlink(portal)$</li></ul>"
1 name to status subject from description test_recipient importance body
2 Notification to caller on User Request public log update SELECT Person WHERE id=:this->caller_id enabled The ticket $this->ref$ has been updated test@combodo.com This action informs a caller that the public log of a ticket has been updated test@test.com normal $this-&gt;head_html(public_log)$<br> $this-&gt;hyperlink(portal)$
3 Notification to agent on User Request private log update SELECT Person WHERE id=:this->agent_id enabled Votre ticket $this->ref$ a été mis à jour test@combodo.com This action informs the agent that the private log of a ticket has been updated test@test.com normal <ul><li>$this-&gt;head_html(public_log)$</li><li> $this-&gt;hyperlink(portal)$</li></ul>

View File

@@ -0,0 +1,3 @@
trigger_id;action_id;order
2;4;1
3;5;1
1 trigger_id action_id order
2 2 4 1
3 3 5 1

View File

@@ -0,0 +1,6 @@
name;servicesubcategory_id->name;label;service_id->organization_name;service_id->name
Desktop ordering details;New desktop ordering;Fournir la marque et le modèle souhaité;IT Department;Computers and peripherals
Détail du coq au vin;Coq au vin;Détail pour le Coq au vin;IT Special;Service pour les Gaulois
Laptop ordering;New laptop ordering;Provide Size, Brand & Model;IT Department;Computers and peripherals
Special laptop ordering;New laptop ordering;Provide Color, Brand, Model and date;IT Department;Computers and peripherals
LCD ordering;New LCD monitor ordering;Read-only label of this Request Template;IT Department;Computers and peripherals
1 name servicesubcategory_id->name label service_id->organization_name service_id->name
2 Desktop ordering details New desktop ordering Fournir la marque et le modèle souhaité IT Department Computers and peripherals
3 Détail du coq au vin Coq au vin Détail pour le Coq au vin IT Special Service pour les Gaulois
4 Laptop ordering New laptop ordering Provide Size, Brand & Model IT Department Computers and peripherals
5 Special laptop ordering New laptop ordering Provide Color, Brand, Model and date IT Department Computers and peripherals
6 LCD ordering New LCD monitor ordering Read-only label of this Request Template IT Department Computers and peripherals

View File

@@ -0,0 +1,24 @@
code;template_id->name;order;mandatory;input_type;initial_value;label;values;format
brand;Desktop ordering details;11;yes;radio_buttons;;Marque obligatoire;Cisco,HP,Apple,IBM,Samsung;
model;Desktop ordering details;12;yes;drop_down_list;;Modèle imposé;SELECT Model WHERE brand_id_friendlyname = :template->brand;
weight;Laptop ordering;20;yes;radio_buttons;;Size option;light,wide;
brand;Laptop ordering;21;yes;drop_down_list;;Brand required;SELECT Brand;
model;Laptop ordering;22;yes;drop_down_list;;Model if you care;SELECT Model WHERE brand_id=:template->brand;
date;Détail du coq au vin;1;yes;date;;Date de naissance;;
date_time;Détail du coq au vin;2;yes;date_and_time;;Heure de livraison;;
drop_down;Détail du coq au vin;3;yes;drop_down_list;;Cuisson;bleu,à point,bien cuit;
duration;Détail du coq au vin;4;yes;duration;;Durée de cuisson;;
hidden;Détail du coq au vin;5;yes;hidden;Ce texte statique ne doit être visible que depuis la Console;Message pour l'agent;;
list;Détail du coq au vin;6;yes;radio_buttons;;Marque;SELECT Brand;
dropdownlist2;Détail du coq au vin;7;yes;drop_down_list;;Modèle (par Marque);SELECT Model WHERE Model.brand_id = :template->list;
read_only;Détail du coq au vin;8;yes;read_only;Cette valeur visible en console et en portail est non modifiable;Lecture seule;;
text;Détail du coq au vin;9;yes;text;;Commentaire;;
text_area;Détail du coq au vin;10;yes;text_area;;Recette;;
color;Special laptop ordering;30;yes;radio_buttons;;Couleur imposée;bleu,vert,jaune,rouge,orange,violet,noir,blanc;
brand;Special laptop ordering;31;yes;radio_buttons;1;Marque optionelle;SELECT Brand;
model;Special laptop ordering;32;yes;drop_down_list;;Modèle obligatoire;SELECT Model WHERE brand_id=:template->brand;
delivery_date;Special laptop ordering;33;yes;date;;Date de livraison souhaitée;;
brand;LCD ordering;41;yes;text;;Marque textuel obligatoire;;
size;LCD ordering;42;yes;radio_buttons;"21""";Taille de l'écran (choix facultatif);"17"",19"",21""";
contact_type;LCD ordering;43;yes;drop_down_list;Person;type de contact;Person,Team;
contact;LCD ordering;44;yes;drop_down_list;;contact;SELECT Contact WHERE finalclass = :template->contact_type AND org_id = :current_contact->org_id;
1 code template_id->name order mandatory input_type initial_value label values format
2 brand Desktop ordering details 11 yes radio_buttons Marque obligatoire Cisco,HP,Apple,IBM,Samsung
3 model Desktop ordering details 12 yes drop_down_list Modèle imposé SELECT Model WHERE brand_id_friendlyname = :template->brand
4 weight Laptop ordering 20 yes radio_buttons Size option light,wide
5 brand Laptop ordering 21 yes drop_down_list Brand required SELECT Brand
6 model Laptop ordering 22 yes drop_down_list Model if you care SELECT Model WHERE brand_id=:template->brand
7 date Détail du coq au vin 1 yes date Date de naissance
8 date_time Détail du coq au vin 2 yes date_and_time Heure de livraison
9 drop_down Détail du coq au vin 3 yes drop_down_list Cuisson bleu,à point,bien cuit
10 duration Détail du coq au vin 4 yes duration Durée de cuisson
11 hidden Détail du coq au vin 5 yes hidden Ce texte statique ne doit être visible que depuis la Console Message pour l'agent
12 list Détail du coq au vin 6 yes radio_buttons Marque SELECT Brand
13 dropdownlist2 Détail du coq au vin 7 yes drop_down_list Modèle (par Marque) SELECT Model WHERE Model.brand_id = :template->list
14 read_only Détail du coq au vin 8 yes read_only Cette valeur visible en console et en portail est non modifiable Lecture seule
15 text Détail du coq au vin 9 yes text Commentaire
16 text_area Détail du coq au vin 10 yes text_area Recette
17 color Special laptop ordering 30 yes radio_buttons Couleur imposée bleu,vert,jaune,rouge,orange,violet,noir,blanc
18 brand Special laptop ordering 31 yes radio_buttons 1 Marque optionelle SELECT Brand
19 model Special laptop ordering 32 yes drop_down_list Modèle obligatoire SELECT Model WHERE brand_id=:template->brand
20 delivery_date Special laptop ordering 33 yes date Date de livraison souhaitée
21 brand LCD ordering 41 yes text Marque textuel obligatoire
22 size LCD ordering 42 yes radio_buttons 21" Taille de l'écran (choix facultatif) 17",19",21"
23 contact_type LCD ordering 43 yes drop_down_list Person type de contact Person,Team
24 contact LCD ordering 44 yes drop_down_list contact SELECT Contact WHERE finalclass = :template->contact_type AND org_id = :current_contact->org_id

View File

@@ -0,0 +1,20 @@
{
"Organization": "name",
"Person": "name,first_name,org_id->name",
"UserLocal": "login",
"Team": "name",
"DeliveryModel": "name",
"lnkDeliveryModelToContact": "deliverymodel_id,contact_id",
"Service": "name,org_id->name",
"CustomerContract": "name,org_id->name",
"CoverageWindow": "name",
"CoverageWindowInterval": "coverage_window_id->name,weekday",
"lnkCustomerContractToService": "customercontract_id->organization_name;customercontract_id->name;customercontract_id->provider_name;service_id->organization_name;service_id->name",
"ApprovalRule": "name",
"ServiceSubcategory": "name,service_id->name,service_id->organization_name",
"TriggerOnLogUpdate": "description",
"ActionEmail": "name",
"lnkTriggerAction": "trigger_id,action_id",
"RequestTemplate": "label",
"TemplateField": "code,template_id->name"
}

View File

@@ -0,0 +1,10 @@
Feature: Test itop
In order access the application, users must be able to log in
@pro @com
Scenario: config voit toutes les organisations
Given there is an iTop installed with the standard datamodel and sample data 'default'
And I login as "config/config"
And I have a valid user account 'config/config'
And I wait for 2 seconds
Then I follow "Déconnexion"