Loading .gitlab-ci.yml +2 −3 Original line number Diff line number Diff line Loading @@ -83,8 +83,7 @@ run-modules-functional-tests: stage: test-code extends: .web-build script: - echo $(head -1 /etc/hosts | cut -f1) redmic.local >> /etc/hosts - npm start -- -p 80 & - npm start & - grunt test-functional-local --functionalSuites=tests/functional/modules/**/!\(*Script\).js --headless only: - branches Loading Loading @@ -132,7 +131,7 @@ run-functional-tests: - functional-testing script: - > grunt test-functional-local --server-url="https://${DEV_PUBLIC_HOSTNAME}" --user="${REDMIC_TEST_USER}" grunt test-functional-local --serverUrl="https://${DEV_PUBLIC_HOSTNAME}" --user="${REDMIC_TEST_USER}" --pass="${REDMIC_TEST_PASS}" --role=administrator --suitesGroups="${SUITES_GROUPS}" --headless only: - schedules Loading grunt/config/test.js +6 −2 Original line number Diff line number Diff line Loading @@ -19,10 +19,12 @@ module.exports = function(grunt) { ownSocketPort = parseInt(grunt.option('ownSocketPort'), 10), ownTunnelPort = parseInt(grunt.option('ownTunnelPort'), 10), headless = grunt.option('headless') || false, serverUrl = grunt.option('server-url'), serverUrl = grunt.option('serverUrl'), role = grunt.option('role'), user = grunt.option('user'), pass = grunt.option('pass'), remoteHost = grunt.option('remoteHost'), remotePort = grunt.option('remotePort'), suitesGroups = grunt.option('suitesGroups'), suites = grunt.option('suites'), functionalSuites = grunt.option('functionalSuites'), Loading Loading @@ -107,7 +109,9 @@ module.exports = function(grunt) { functionalSuites: functionalSuites, reportersOutputPath: reportersOutputPath, dojoBaseUrl: '.' + dojoCommonBaseUrl, userDataDir: userDataDir userDataDir: userDataDir, remoteHost: remoteHost, remotePort: remotePort }), testUnitLocalOptions = require(testUnitLocalPath)(testUnitParams), Loading grunt/task/test.js +14 −3 Original line number Diff line number Diff line Loading @@ -9,6 +9,11 @@ module.exports = function(grunt) { , '"--suitesGroups=suitesFolderName" para indicar grupos de suites ejecutar desde la raíz correspondiente' ], remoteOptionParameters = [ '"--remoteHost=host" para redefinir la dirección del servicio de testeo remoto' , '"--remotePort=port" para redefinir el puerto del servicio de testeo remoto' ], unitOptionParameters = [ '"--suites=suitesFilePath" para indicar que ficheros de suites ejecutar (inhabilita "suitesGroups")' , '"--coverage=pathsToCover" para indicar que rutas incluir en la cobertura (por defecto, en todas)' Loading @@ -20,7 +25,7 @@ module.exports = function(grunt) { , '"--user=userEmail" para definir el nombre de acceso del usuario' , '"--pass=userPassword" para definir el password de acceso del usuario' , '"--headless" para ejecutar sin interfaz' , '"--server-url=url" para definir la dirección de la aplicación a testear' , '"--serverUrl=url" para definir la dirección de la aplicación a testear' ]; grunt.registerTask('test-unit-local', Loading @@ -42,6 +47,7 @@ module.exports = function(grunt) { , '"--ownServerHost=host" para redefinir dirección del servidor de intern, para indicarle al túnel remoto'] .concat(commonOptionParameters) .concat(unitOptionParameters) .concat(remoteOptionParameters) .join('\n'), commonTasks.concat(['intern:test-unit-remote'])); Loading @@ -49,6 +55,7 @@ module.exports = function(grunt) { ['Ejecuta los tests funcionales en entorno remoto'] .concat(commonOptionParameters) .concat(functionalOptionParameters) .concat(remoteOptionParameters) .join('\n'), commonTasks.concat(['intern:test-functional-remote'])); Loading @@ -61,11 +68,11 @@ module.exports = function(grunt) { grunt.config('shell.test-functional-local-parallel', { command: function() { var serverUrlParam = grunt.option('server-url') || 'http://redmic.local', var serverUrlParam = grunt.option('serverUrl'), userParam = grunt.option('user'), passParam = grunt.option('pass'), serverPort = 9000, gruntCommand = 'grunt test-functional-local --headless --server-url="' + serverUrlParam + '"', gruntCommand = 'grunt test-functional-local --headless', publicZoneGroups = 'catalog,catalogDetails,viewers,products', administrativeZoneGroup = 'administrative,!administrative/taxonomy', Loading Loading @@ -99,6 +106,10 @@ module.exports = function(grunt) { cmds = [], commandsGrunt = ''; if (serverUrlParam) { gruntCommand += ' --serverUrl="' + serverUrlParam + '"'; } for (var i = 0; i < userZoneGroupsList.length; i++) { specificParamsList.push(userCommonTestsParams + userZoneGroupsList[i]); } Loading tests/_remote.js +2 −2 Original line number Diff line number Diff line module.exports = function(args) { var remoteHost = '192.168.40.6', remotePort = '4444', var remoteHost = args.remoteHost || '192.168.40.6', remotePort = args.remotePort || '4444', remoteTunnel = remoteHost + ':' + remotePort, config = { Loading tests/intern-functional-local.js +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ module.exports = function(args) { _internFunctional = require('./_intern-functional')(args), serverUrl = args.serverUrl || 'http://redmic.local', serverUrl = args.serverUrl || 'http://localhost:3050', config = { serverUrl: serverUrl Loading Loading
.gitlab-ci.yml +2 −3 Original line number Diff line number Diff line Loading @@ -83,8 +83,7 @@ run-modules-functional-tests: stage: test-code extends: .web-build script: - echo $(head -1 /etc/hosts | cut -f1) redmic.local >> /etc/hosts - npm start -- -p 80 & - npm start & - grunt test-functional-local --functionalSuites=tests/functional/modules/**/!\(*Script\).js --headless only: - branches Loading Loading @@ -132,7 +131,7 @@ run-functional-tests: - functional-testing script: - > grunt test-functional-local --server-url="https://${DEV_PUBLIC_HOSTNAME}" --user="${REDMIC_TEST_USER}" grunt test-functional-local --serverUrl="https://${DEV_PUBLIC_HOSTNAME}" --user="${REDMIC_TEST_USER}" --pass="${REDMIC_TEST_PASS}" --role=administrator --suitesGroups="${SUITES_GROUPS}" --headless only: - schedules Loading
grunt/config/test.js +6 −2 Original line number Diff line number Diff line Loading @@ -19,10 +19,12 @@ module.exports = function(grunt) { ownSocketPort = parseInt(grunt.option('ownSocketPort'), 10), ownTunnelPort = parseInt(grunt.option('ownTunnelPort'), 10), headless = grunt.option('headless') || false, serverUrl = grunt.option('server-url'), serverUrl = grunt.option('serverUrl'), role = grunt.option('role'), user = grunt.option('user'), pass = grunt.option('pass'), remoteHost = grunt.option('remoteHost'), remotePort = grunt.option('remotePort'), suitesGroups = grunt.option('suitesGroups'), suites = grunt.option('suites'), functionalSuites = grunt.option('functionalSuites'), Loading Loading @@ -107,7 +109,9 @@ module.exports = function(grunt) { functionalSuites: functionalSuites, reportersOutputPath: reportersOutputPath, dojoBaseUrl: '.' + dojoCommonBaseUrl, userDataDir: userDataDir userDataDir: userDataDir, remoteHost: remoteHost, remotePort: remotePort }), testUnitLocalOptions = require(testUnitLocalPath)(testUnitParams), Loading
grunt/task/test.js +14 −3 Original line number Diff line number Diff line Loading @@ -9,6 +9,11 @@ module.exports = function(grunt) { , '"--suitesGroups=suitesFolderName" para indicar grupos de suites ejecutar desde la raíz correspondiente' ], remoteOptionParameters = [ '"--remoteHost=host" para redefinir la dirección del servicio de testeo remoto' , '"--remotePort=port" para redefinir el puerto del servicio de testeo remoto' ], unitOptionParameters = [ '"--suites=suitesFilePath" para indicar que ficheros de suites ejecutar (inhabilita "suitesGroups")' , '"--coverage=pathsToCover" para indicar que rutas incluir en la cobertura (por defecto, en todas)' Loading @@ -20,7 +25,7 @@ module.exports = function(grunt) { , '"--user=userEmail" para definir el nombre de acceso del usuario' , '"--pass=userPassword" para definir el password de acceso del usuario' , '"--headless" para ejecutar sin interfaz' , '"--server-url=url" para definir la dirección de la aplicación a testear' , '"--serverUrl=url" para definir la dirección de la aplicación a testear' ]; grunt.registerTask('test-unit-local', Loading @@ -42,6 +47,7 @@ module.exports = function(grunt) { , '"--ownServerHost=host" para redefinir dirección del servidor de intern, para indicarle al túnel remoto'] .concat(commonOptionParameters) .concat(unitOptionParameters) .concat(remoteOptionParameters) .join('\n'), commonTasks.concat(['intern:test-unit-remote'])); Loading @@ -49,6 +55,7 @@ module.exports = function(grunt) { ['Ejecuta los tests funcionales en entorno remoto'] .concat(commonOptionParameters) .concat(functionalOptionParameters) .concat(remoteOptionParameters) .join('\n'), commonTasks.concat(['intern:test-functional-remote'])); Loading @@ -61,11 +68,11 @@ module.exports = function(grunt) { grunt.config('shell.test-functional-local-parallel', { command: function() { var serverUrlParam = grunt.option('server-url') || 'http://redmic.local', var serverUrlParam = grunt.option('serverUrl'), userParam = grunt.option('user'), passParam = grunt.option('pass'), serverPort = 9000, gruntCommand = 'grunt test-functional-local --headless --server-url="' + serverUrlParam + '"', gruntCommand = 'grunt test-functional-local --headless', publicZoneGroups = 'catalog,catalogDetails,viewers,products', administrativeZoneGroup = 'administrative,!administrative/taxonomy', Loading Loading @@ -99,6 +106,10 @@ module.exports = function(grunt) { cmds = [], commandsGrunt = ''; if (serverUrlParam) { gruntCommand += ' --serverUrl="' + serverUrlParam + '"'; } for (var i = 0; i < userZoneGroupsList.length; i++) { specificParamsList.push(userCommonTestsParams + userZoneGroupsList[i]); } Loading
tests/_remote.js +2 −2 Original line number Diff line number Diff line module.exports = function(args) { var remoteHost = '192.168.40.6', remotePort = '4444', var remoteHost = args.remoteHost || '192.168.40.6', remotePort = args.remotePort || '4444', remoteTunnel = remoteHost + ':' + remotePort, config = { Loading
tests/intern-functional-local.js +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ module.exports = function(args) { _internFunctional = require('./_intern-functional')(args), serverUrl = args.serverUrl || 'http://redmic.local', serverUrl = args.serverUrl || 'http://localhost:3050', config = { serverUrl: serverUrl Loading