Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
S
stats-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneurs
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
stats-facil
Validations
1ff3cfec
Valider
1ff3cfec
rédigé
9 years ago
par
Thomas Steur
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Run UI tests in two different jobs
apply new naming
parent
96ae06bd
Branches
Branches contenant la validation
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
.travis.yml
+5
-2
5 ajouts, 2 suppressions
.travis.yml
tests/lib/screenshot-testing/support/app.js
+22
-0
22 ajouts, 0 suppression
tests/lib/screenshot-testing/support/app.js
tests/travis
+1
-1
1 ajout, 1 suppression
tests/travis
avec
28 ajouts
et
3 suppressions
.travis.yml
+
5
−
2
Voir le fichier @
1ff3cfec
...
@@ -30,7 +30,8 @@ env:
...
@@ -30,7 +30,8 @@ env:
# All tests after another
# All tests after another
-
TEST_SUITE=AllTests MYSQL_ADAPTER=PDO_MYSQL
-
TEST_SUITE=AllTests MYSQL_ADAPTER=PDO_MYSQL
-
TEST_SUITE=AllTests MYSQL_ADAPTER=MYSQLI
-
TEST_SUITE=AllTests MYSQL_ADAPTER=MYSQLI
-
TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL
-
TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL UITEST_EXTRA_OPTIONS="--run-first-half-only"
-
TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL UITEST_EXTRA_OPTIONS="--run-second-half-only"
global
:
global
:
-
PIWIK_ROOT_DIR=$TRAVIS_BUILD_DIR
-
PIWIK_ROOT_DIR=$TRAVIS_BUILD_DIR
-
SKIP_INSTALL_MYSQL_56=1
-
SKIP_INSTALL_MYSQL_56=1
...
@@ -60,7 +61,9 @@ matrix:
...
@@ -60,7 +61,9 @@ matrix:
env
:
TEST_SUITE=UnitTests MYSQL_ADAPTER=PDO_MYSQL
env
:
TEST_SUITE=UnitTests MYSQL_ADAPTER=PDO_MYSQL
# run UI tests on PHP 5.3.3 only
# run UI tests on PHP 5.3.3 only
-
php
:
5.6
-
php
:
5.6
env
:
TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL
env
:
TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL UITEST_EXTRA_OPTIONS="--run-first-half-only"
-
php
:
5.6
env
:
TEST_SUITE=UITests MYSQL_ADAPTER=PDO_MYSQL UITEST_EXTRA_OPTIONS="--run-second-half-only"
# run all tests not on PHP 5.6 and run MySQLI tests only on 5.6
# run all tests not on PHP 5.6 and run MySQLI tests only on 5.6
-
php
:
5.6
-
php
:
5.6
env
:
TEST_SUITE=AllTests MYSQL_ADAPTER=PDO_MYSQL
env
:
TEST_SUITE=AllTests MYSQL_ADAPTER=PDO_MYSQL
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
tests/lib/screenshot-testing/support/app.js
+
22
−
0
Voir le fichier @
1ff3cfec
...
@@ -66,6 +66,10 @@ Application.prototype.printHelpAndExit = function () {
...
@@ -66,6 +66,10 @@ Application.prototype.printHelpAndExit = function () {
console
.
log
(
"
--screenshot-repo: Specifies the github repository that contains the expected screenshots
"
);
console
.
log
(
"
--screenshot-repo: Specifies the github repository that contains the expected screenshots
"
);
console
.
log
(
"
to link to in the diffviewer. For use with travis build.
"
);
console
.
log
(
"
to link to in the diffviewer. For use with travis build.
"
);
console
.
log
(
"
--core: Only execute UI tests that are for Piwik core or Piwik core plugins.
"
);
console
.
log
(
"
--core: Only execute UI tests that are for Piwik core or Piwik core plugins.
"
);
console
.
log
(
"
--first-half: Only execute first half of all the test suites. Will be only applied if no
"
)
console
.
log
(
"
specific plugin or test-files requested
"
);
console
.
log
(
"
--second-half: Only execute second half of all the test suites. Will be only applied if no
"
)
console
.
log
(
"
specific plugin or test-files requested
"
);
phantom
.
exit
(
0
);
phantom
.
exit
(
0
);
};
};
...
@@ -131,6 +135,24 @@ Application.prototype.loadTestModules = function () {
...
@@ -131,6 +135,24 @@ Application.prototype.loadTestModules = function () {
});
});
}
}
var
specificTestsRequested
=
options
.
plugin
||
options
.
tests
.
length
;
if
((
options
[
'
run-first-half-only
'
]
||
options
[
'
run-second-half-only
'
])
&&
!
specificTestsRequested
)
{
// run only first 50% of the test suites or only run last 50% of the test suites.
// we apply this option only if not a specific plugin or test suite was requested. Only there for travis to
// split tests into multiple jobs.
var
numTestsFirstHalf
=
Math
.
round
(
mocha
.
suite
.
suites
.
length
/
2
);
numTestsFirstHalf
+=
5
;
// run a few more test suits in first half as UiIntegrationTests contain many tests
mocha
.
suite
.
suites
=
mocha
.
suite
.
suites
.
filter
(
function
(
suite
,
index
)
{
if
(
options
[
'
run-first-half-only
'
]
&&
index
<
numTestsFirstHalf
)
{
return
true
;
}
else
if
(
options
[
'
run-second-half-only
'
]
&&
index
>=
numTestsFirstHalf
)
{
return
true
;
}
return
false
;
});
}
if
(
!
mocha
.
suite
.
suites
.
length
)
{
if
(
!
mocha
.
suite
.
suites
.
length
)
{
console
.
log
(
"
No tests are executing... are you running tests for a plugin? Make sure to use the
"
console
.
log
(
"
No tests are executing... are you running tests for a plugin? Make sure to use the
"
+
"
--plugin=MyPlugin option.
"
);
+
"
--plugin=MyPlugin option.
"
);
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
travis
@
b7a9cd1a
Comparer
f62fc4fe
...
b7a9cd1a
Subproject commit
f62fc4fe97a88aa11e495abda384f142b38fd580
Subproject commit
b7a9cd1a1755b9f500ac111713ce07bb983c12e7
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter