From 4af17273c81aa037e7ce0604402a27c26d277719 Mon Sep 17 00:00:00 2001 From: Augusto Date: Tue, 31 Dec 2024 18:00:26 +0100 Subject: [PATCH] First draft with the new orchestrator version --- Jenkinsfile | 112 +++--- .../FullTeachingSystemResources.json | 362 ++++++++++++++++++ .../configurations/retorch-ciinfo.json | 10 - retorchfiles/configurations/retorch-info.json | 28 -- .../configurations/retorchCI.properties | 8 + .../customscriptscode/custom-tjob-setup | 1 + .../customscriptscode/custom-tjob-teardown | 1 + retorchfiles/customscriptscode/custom.env | 0 retorchfiles/envfiles/tjoba.env | 17 + retorchfiles/envfiles/tjobb.env | 17 + retorchfiles/envfiles/tjobc.env | 24 +- retorchfiles/envfiles/tjobd.env | 22 +- retorchfiles/envfiles/tjobe.env | 24 +- retorchfiles/envfiles/tjobf.env | 22 +- retorchfiles/envfiles/tjobg.env | 22 +- retorchfiles/envfiles/tjobh.env | 22 +- retorchfiles/envfiles/tjobi.env | 22 +- retorchfiles/envfiles/tjobj.env | 22 +- retorchfiles/envfiles/tjobk.env | 24 +- retorchfiles/envfiles/tjobl.env | 22 +- retorchfiles/envfiles/tjobm.env | 17 - retorchfiles/envfiles/tjobn.env | 17 - .../FullTeachingSystemResources.json | 130 ------- .../scripts/coilifecycles/coi-setup.sh | 24 +- .../scripts/coilifecycles/coi-teardown.sh | 53 ++- retorchfiles/scripts/printLog.sh | 8 + retorchfiles/scripts/savetjoblifecycledata.sh | 9 +- retorchfiles/scripts/storeContainerLogs.sh | 18 + .../scripts/tjoblifecycles/tjob-setup.sh | 38 +- .../scripts/tjoblifecycles/tjob-teardown.sh | 23 +- .../tjoblifecycles/tjob-testexecution.sh | 19 +- retorchfiles/scripts/waitforSUT.sh | 12 +- retorchfiles/scripts/writetime.sh | 6 +- .../functional/test/LoggedForumTest.java | 52 +-- .../functional/test/LoggedLinksTests.java | 12 +- .../functional/test/UnLoggedLinksTests.java | 12 +- .../no_elastest/functional/test/UserTest.java | 9 +- .../media/FullTeachingEndToEndEChatTests.java | 12 +- .../media/FullTeachingEndToEndRESTTests.java | 72 ++-- .../FullTeachingLoggedVideoSessionTests.java | 12 +- ...TeachingTestEndToEndVideoSessionTests.java | 14 +- .../test/student/CourseStudentTest.java | 12 +- .../test/teacher/CourseTeacherTest.java | 49 +-- 43 files changed, 854 insertions(+), 558 deletions(-) create mode 100644 retorchfiles/configurations/FullTeachingSystemResources.json delete mode 100644 retorchfiles/configurations/retorch-ciinfo.json delete mode 100644 retorchfiles/configurations/retorch-info.json create mode 100644 retorchfiles/configurations/retorchCI.properties create mode 100644 retorchfiles/customscriptscode/custom-tjob-setup create mode 100644 retorchfiles/customscriptscode/custom-tjob-teardown create mode 100644 retorchfiles/customscriptscode/custom.env create mode 100644 retorchfiles/envfiles/tjoba.env create mode 100644 retorchfiles/envfiles/tjobb.env delete mode 100644 retorchfiles/envfiles/tjobm.env delete mode 100644 retorchfiles/envfiles/tjobn.env delete mode 100644 retorchfiles/resources/FullTeachingSystemResources.json create mode 100644 retorchfiles/scripts/printLog.sh create mode 100644 retorchfiles/scripts/storeContainerLogs.sh diff --git a/Jenkinsfile b/Jenkinsfile index 8b6d520..4f2a408 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,126 +28,126 @@ pipeline { stage('Stage 0'){ failFast false parallel{ - stage('TJobC IdResource: Attenders LoginService OpenViduMock ') { + stage('TJobA IdResource: Attenders LoginService OpenViduMock ') { + steps { + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjoba 0' + catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjoba 0 https://full-teaching- 5000 "FullTeachingEndToEndRESTTests#attendersRestOperations"' + }// EndExecutionStageErrorTJobA + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjoba 0' + }// EndStepsTJobA + }// EndStageTJobA + stage('TJobB IdResource: Configuration LoginService OpenViduMock ') { + steps { + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobb 0' + catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobb 0 https://full-teaching- 5000 "FullTeachingEndToEndRESTTests#courseRestOperations,CourseTeacherTest#teacherEditCourseValues"' + }// EndExecutionStageErrorTJobB + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobb 0' + }// EndStepsTJobB + }// EndStageTJobB + stage('TJobC IdResource: Configuration LoginService OpenVidu ') { steps { sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobc 0' catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobc 0 https://full-teaching- 5000 "FullTeachingEndToEndRESTTests#attendersRestOperations"' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobc 0 https://full-teaching- 5000 "FullTeachingEndToEndEChatTests#oneToOneChatInSessionChrome"' }// EndExecutionStageErrorTJobC sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobc 0' }// EndStepsTJobC }// EndStageTJobC - stage('TJobD IdResource: Configuration LoginService OpenViduMock ') { + stage('TJobD IdResource: Course LoginService OpenViduMock ') { steps { sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobd 0' catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobd 0 https://full-teaching- 5000 "FullTeachingEndToEndRESTTests#courseRestOperations,CourseTeacherTest#teacherEditCourseValues"' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobd 0 https://full-teaching- 5000 "LoggedLinksTests#spiderLoggedTest,UnLoggedLinksTests#spiderUnloggedTest,CourseTeacherTest#teacherDeleteCourseTest"' }// EndExecutionStageErrorTJobD sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobd 0' }// EndStepsTJobD }// EndStageTJobD - stage('TJobE IdResource: Configuration LoginService OpenVidu ') { + stage('TJobE IdResource: Course LoginService OpenViduMock ') { steps { sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobe 0' catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobe 0 https://full-teaching- 5000 "FullTeachingEndToEndEChatTests#oneToOneChatInSessionChrome"' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobe 0 https://full-teaching- 5000 "CourseStudentTest#studentCourseMainTest,CourseTeacherTest#teacherCourseMainTest,CourseTeacherTest#teacherCreateAndDeleteCourseTest"' }// EndExecutionStageErrorTJobE sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobe 0' }// EndStepsTJobE }// EndStageTJobE - stage('TJobF IdResource: Course LoginService OpenViduMock ') { + }// End Parallel + }// End Stage + stage('Stage 1'){ + failFast false + parallel{ + stage('TJobF IdResource: Information LoginService OpenViduMock ') { steps { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobf 0' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobf 1' catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobf 0 https://full-teaching- 5000 "LoggedLinksTests#spiderLoggedTest,UnLoggedLinksTests#spiderUnloggedTest,CourseTeacherTest#teacherDeleteCourseTest"' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobf 1 https://full-teaching- 5000 "FullTeachingEndToEndRESTTests#courseInfoRestOperations"' }// EndExecutionStageErrorTJobF - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobf 0' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobf 1' }// EndStepsTJobF }// EndStageTJobF - stage('TJobG IdResource: Course LoginService OpenViduMock ') { + stage('TJobG IdResource: Files LoginService OpenViduMock ') { steps { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobg 0' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobg 1' catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobg 0 https://full-teaching- 5000 "CourseStudentTest#studentCourseMainTest,CourseTeacherTest#teacherCourseMainTest,CourseTeacherTest#teacherCreateAndDeleteCourseTest"' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobg 1 https://full-teaching- 5000 "FullTeachingEndToEndRESTTests#filesRestOperations"' }// EndExecutionStageErrorTJobG - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobg 0' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobg 1' }// EndStepsTJobG }// EndStageTJobG - }// End Parallel - }// End Stage - stage('Stage 1'){ - failFast false - parallel{ - stage('TJobH IdResource: Information LoginService OpenViduMock ') { + stage('TJobH IdResource: Forum LoginService OpenViduMock ') { steps { sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobh 1' catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobh 1 https://full-teaching- 5000 "FullTeachingEndToEndRESTTests#courseInfoRestOperations"' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobh 1 https://full-teaching- 5000 "LoggedForumTest#forumLoadEntriesTest"' }// EndExecutionStageErrorTJobH sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobh 1' }// EndStepsTJobH }// EndStageTJobH - stage('TJobI IdResource: Files LoginService OpenViduMock ') { + stage('TJobI IdResource: Forum LoginService OpenViduMock ') { steps { sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobi 1' catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobi 1 https://full-teaching- 5000 "FullTeachingEndToEndRESTTests#filesRestOperations"' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobi 1 https://full-teaching- 5000 "LoggedForumTest#forumNewCommentTest,LoggedForumTest#forumNewEntryTest,LoggedForumTest#forumNewReply2CommentTest,FullTeachingEndToEndRESTTests#forumRestOperations"' }// EndExecutionStageErrorTJobI sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobi 1' }// EndStepsTJobI }// EndStageTJobI - stage('TJobJ IdResource: Forum LoginService OpenViduMock ') { + stage('TJobJ IdResource: LoginService OpenViduMock ') { steps { sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobj 1' catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobj 1 https://full-teaching- 5000 "LoggedForumTest#forumLoadEntriesTest"' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobj 1 https://full-teaching- 5000 "UserTest#loginTest"' }// EndExecutionStageErrorTJobJ sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobj 1' }// EndStepsTJobJ }// EndStageTJobJ - stage('TJobK IdResource: Forum LoginService OpenViduMock ') { + }// End Parallel + }// End Stage + stage('Stage 2'){ + failFast false + parallel{ + stage('TJobK IdResource: Session LoginService OpenVidu ') { steps { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobk 1' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobk 2' catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobk 1 https://full-teaching- 5000 "LoggedForumTest#forumNewCommentTest,LoggedForumTest#forumNewEntryTest,LoggedForumTest#forumNewReply2CommentTest,FullTeachingEndToEndRESTTests#forumRestOperations"' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobk 2 https://full-teaching- 5000 "FullTeachingTestEndToEndVideoSessionTests#oneToOneVideoAudioSessionChrome,FullTeachingLoggedVideoSessionTests#sessionTest"' }// EndExecutionStageErrorTJobK - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobk 1' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobk 2' }// EndStepsTJobK }// EndStageTJobK - stage('TJobL IdResource: LoginService OpenViduMock ') { + stage('TJobL IdResource: Session LoginService OpenViduMock ') { steps { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobl 1' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobl 2' catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobl 1 https://full-teaching- 5000 "UserTest#loginTest"' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobl 2 https://full-teaching- 5000 "FullTeachingEndToEndRESTTests#sessionRestOperations"' }// EndExecutionStageErrorTJobL - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobl 1' + sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobl 2' }// EndStepsTJobL }// EndStageTJobL }// End Parallel }// End Stage - stage('Stage 2'){ - failFast false - parallel{ - stage('TJobM IdResource: Session LoginService OpenVidu ') { - steps { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobm 2' - catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobm 2 https://full-teaching- 5000 "FullTeachingTestEndToEndVideoSessionTests#oneToOneVideoAudioSessionChrome,FullTeachingLoggedVideoSessionTests#sessionTest"' - }// EndExecutionStageErrorTJobM - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobm 2' - }// EndStepsTJobM - }// EndStageTJobM - stage('TJobN IdResource: Session LoginService OpenViduMock ') { - steps { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-setup.sh tjobn 2' - catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-testexecution.sh tjobn 2 https://full-teaching- 5000 "FullTeachingEndToEndRESTTests#sessionRestOperations"' - }// EndExecutionStageErrorTJobN - sh '$SCRIPTS_FOLDER/tjoblifecycles/tjob-teardown.sh tjobn 2' - }// EndStepsTJobN - }// EndStageTJobN - }// End Parallel - }// End Stage stage('TEARDOWN-Infrastructure') { steps { sh '$SCRIPTS_FOLDER/coilifecycles/coi-teardown.sh' diff --git a/retorchfiles/configurations/FullTeachingSystemResources.json b/retorchfiles/configurations/FullTeachingSystemResources.json new file mode 100644 index 0000000..d522ef8 --- /dev/null +++ b/retorchfiles/configurations/FullTeachingSystemResources.json @@ -0,0 +1,362 @@ +{ + "openvidumock": { + "hierarchyParent": [ + "openvidu" + ], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasmodelopenvidumock", + "elasticity": 30, + "elasticityCost": 10.0 + }, + "resourceType": "LOGICAL", + "resourceID": "openvidumock", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.048 + }, + { + "name": "processor", + "quantity": 0.25 + }, + { + "name": "storage", + "quantity": 0.31 + } + ], + "dockerImage": "mediaserver;eexit/mirror-http-server" + }, + "openvidu": { + "hierarchyParent": [], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasmodelopenvidu", + "elasticity": 1, + "elasticityCost": 300.0 + }, + "resourceType": "LOGICAL", + "resourceID": "openvidu", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 8 + }, + { + "name": "processor", + "quantity": 2 + }, + { + "name": "storage", + "quantity": 0.88 + } + ], + "dockerImage": "mediaserver;openvidu/openvidu-server-kms:1.7.0" + }, + "configuration": { + "hierarchyParent": [ + "course" + ], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasmodelconfiguration", + "elasticity": 5, + "elasticityCost": 15.0 + }, + "resourceType": "LOGICAL", + "resourceID": "configuration", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.2929 + }, + { + "name": "processor", + "quantity": 0.2 + }, + { + "name": "storage", + "quantity": 0.5 + } + ], + "dockerImage": "database;mysql:5.7.21" + }, + "course": { + "hierarchyParent": [ + "mysql" + ], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasmodelcourse", + "elasticity": 5, + "elasticityCost": 90.0 + }, + "resourceType": "LOGICAL", + "resourceID": "course", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.2929 + }, + { + "name": "processor", + "quantity": 0.2 + }, + { + "name": "storage", + "quantity": 0.5 + } + ], + "dockerImage": "database;mysql:5.7.21" + }, + "information": { + "hierarchyParent": [ + "Course" + ], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasmodelinformation", + "elasticity": 5, + "elasticityCost": 15.0 + }, + "resourceType": "LOGICAL", + "resourceID": "information", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.2929 + }, + { + "name": "processor", + "quantity": 0.2 + }, + { + "name": "storage", + "quantity": 0.5 + } + ], + "dockerImage": "database;mysql:5.7.21" + }, + "files": { + "hierarchyParent": [ + "course" + ], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasmodelfiles", + "elasticity": 5, + "elasticityCost": 15.0 + }, + "resourceType": "LOGICAL", + "resourceID": "files", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.2929 + }, + { + "name": "processor", + "quantity": 0.2 + }, + { + "name": "storage", + "quantity": 0.5 + } + ], + "dockerImage": "database;mysql:5.7.21" + }, + "attenders": { + "hierarchyParent": [ + "course" + ], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasmodelattenders", + "elasticity": 5, + "elasticityCost": 15.0 + }, + "resourceType": "LOGICAL", + "resourceID": "attenders", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.2929 + }, + { + "name": "processor", + "quantity": 0.2 + }, + { + "name": "storage", + "quantity": 0.5 + } + ], + "dockerImage": "database;mysql:5.7.21" + }, + "loginservice": { + "hierarchyParent": [ + "mysql" + ], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasmodelloginservice", + "elasticity": 5, + "elasticityCost": 30.0 + }, + "resourceType": "LOGICAL", + "resourceID": "loginservice", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.2929 + }, + { + "name": "processor", + "quantity": 0.2 + }, + { + "name": "storage", + "quantity": 0.5 + } + ], + "dockerImage": "database;mysql:5.7.21" + }, + "session": { + "hierarchyParent": [ + "course" + ], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasmodelsession", + "elasticity": 5, + "elasticityCost": 15.0 + }, + "resourceType": "LOGICAL", + "resourceID": "session", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.2929 + }, + { + "name": "processor", + "quantity": 0.2 + }, + { + "name": "storage", + "quantity": 0.5 + } + ], + "dockerImage": "database;mysql:5.7.21" + }, + "forum": { + "hierarchyParent": [ + "course" + ], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasmodelforum", + "elasticity": 5, + "elasticityCost": 15.0 + }, + "resourceType": "LOGICAL", + "resourceID": "forum", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.2929 + }, + { + "name": "processor", + "quantity": 0.2 + }, + { + "name": "storage", + "quantity": 0.5 + } + ], + "dockerImage": "database;mysql:5.7.21" + }, + "webserver": { + "hierarchyParent": [], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasmodelwebserver", + "elasticity": 5, + "elasticityCost": 100.0 + }, + "resourceType": "LOGICAL", + "resourceID": "webserver", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 1.465 + }, + { + "name": "processor", + "quantity": 0.5 + }, + { + "name": "storage", + "quantity": 0.92 + } + ], + "dockerImage": "webserver;codeurjc/full-teaching:demo" + }, + "executor": { + "hierarchyParent": [], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasmodelexecutor", + "elasticity": 30, + "elasticityCost": 30 + }, + "resourceType": "LOGICAL", + "resourceID": "executor", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 0.14 + }, + { + "name": "processor", + "quantity": 0.25 + }, + { + "name": "storage", + "quantity": 0.49 + } + ], + "dockerImage": "executor;xretorch-agent" + }, + "webbrowser": { + "hierarchyParent": [], + "replaceable": [], + "elasticityModel": { + "elasticityID": "elasmodelwebbrowser", + "elasticity": 6, + "elasticityCost": 50.0 + }, + "resourceType": "LOGICAL", + "resourceID": "webbrowser", + "minimalCapacities": [ + { + "name": "memory", + "quantity": 1 + }, + { + "name": "processor", + "quantity": 0.5 + }, + { + "name": "storage", + "quantity": 1.16 + }, + { + "name": "slots", + "quantity": 1 + } + ], + "dockerImage": "browser;vnc_chrome:lastest" + } +} \ No newline at end of file diff --git a/retorchfiles/configurations/retorch-ciinfo.json b/retorchfiles/configurations/retorch-ciinfo.json deleted file mode 100644 index 2b00638..0000000 --- a/retorchfiles/configurations/retorch-ciinfo.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "agentCIName": "xretorch-agent", - "sut-wait-html": "FullTeaching", - "sut-location": "$WORKSPACE", - "docker-frontend-name": "https://full-teaching-", - "docker-frontend-port": "5000", - "external-binded-port": "", - "external-frontend-url": "" - -} \ No newline at end of file diff --git a/retorchfiles/configurations/retorch-info.json b/retorchfiles/configurations/retorch-info.json deleted file mode 100644 index 90c134a..0000000 --- a/retorchfiles/configurations/retorch-info.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "OpenViduMock": { - "dockerImageResource": [ - { - "placeHolderId": "OpenViduImage", - "imageName": "eexit/mirror-http-server" - }, - { - "placeHolderId": "mysqlImage", - "imageName": "mysql:5.7.21" - } - ], - "testsBasePath": "./" - }, - "generic": { - "dockerImageResource": [ - { - "placeHolderId": "OpenViduImage", - "imageName": "openvidu/openvidu-server-kms:1.7.0" - }, - { - "placeHolderId": "mysqlImage", - "imageName": "mysql:5.7.21" - } - ], - "testsBasePath": "./" - } -} diff --git a/retorchfiles/configurations/retorchCI.properties b/retorchfiles/configurations/retorchCI.properties new file mode 100644 index 0000000..cb5570c --- /dev/null +++ b/retorchfiles/configurations/retorchCI.properties @@ -0,0 +1,8 @@ +agentCIName=xretorch-agent +sut-wait-html=FullTeaching +sut-location=$WORKSPACE +docker-frontend-name=https://full-teaching- +docker-frontend-port=5000 +external-binded-port= +external-frontend-url= +testsBasePath=./ \ No newline at end of file diff --git a/retorchfiles/customscriptscode/custom-tjob-setup b/retorchfiles/customscriptscode/custom-tjob-setup new file mode 100644 index 0000000..31eac4a --- /dev/null +++ b/retorchfiles/customscriptscode/custom-tjob-setup @@ -0,0 +1 @@ +echo "This TJOB Setup dont have any kind of specific commands" \ No newline at end of file diff --git a/retorchfiles/customscriptscode/custom-tjob-teardown b/retorchfiles/customscriptscode/custom-tjob-teardown new file mode 100644 index 0000000..ce6323c --- /dev/null +++ b/retorchfiles/customscriptscode/custom-tjob-teardown @@ -0,0 +1 @@ +echo "This TJOB dont have any kind of specific commands" \ No newline at end of file diff --git a/retorchfiles/customscriptscode/custom.env b/retorchfiles/customscriptscode/custom.env new file mode 100644 index 0000000..e69de29 diff --git a/retorchfiles/envfiles/tjoba.env b/retorchfiles/envfiles/tjoba.env new file mode 100644 index 0000000..21f2629 --- /dev/null +++ b/retorchfiles/envfiles/tjoba.env @@ -0,0 +1,17 @@ +testsBasePath=./ +tjobname=tjoba +frontend_port=5000 +retorchportj=5009 +retorchportk=5010 +retorchporth=5007 +mysqlImage=mysql:5.7.21 +retorchporti=5008 +retorchportf=5005 +retorchportg=5006 +retorchportd=5003 +retorchporte=5004 +retorchportb=5001 +retorchportc=5002 +retorchporta=5000 +OpenViduImage=eexit/mirror-http-server + diff --git a/retorchfiles/envfiles/tjobb.env b/retorchfiles/envfiles/tjobb.env new file mode 100644 index 0000000..eb222a8 --- /dev/null +++ b/retorchfiles/envfiles/tjobb.env @@ -0,0 +1,17 @@ +testsBasePath=./ +tjobname=tjobb +frontend_port=5000 +retorchportj=5020 +retorchportk=5021 +retorchporth=5018 +mysqlImage=mysql:5.7.21 +retorchporti=5019 +retorchportf=5016 +retorchportg=5017 +retorchportd=5014 +retorchporte=5015 +retorchportb=5012 +retorchportc=5013 +retorchporta=5011 +OpenViduImage=eexit/mirror-http-server + diff --git a/retorchfiles/envfiles/tjobc.env b/retorchfiles/envfiles/tjobc.env index 09fa289..063a353 100644 --- a/retorchfiles/envfiles/tjobc.env +++ b/retorchfiles/envfiles/tjobc.env @@ -1,17 +1,17 @@ testsBasePath=./ tjobname=tjobc frontend_port=5000 -retorchportj=5009 -retorchportk=5010 -retorchporth=5007 +retorchportj=5031 +retorchportk=5032 +retorchporth=5029 mysqlImage=mysql:5.7.21 -retorchporti=5008 -retorchportf=5005 -retorchportg=5006 -retorchportd=5003 -retorchporte=5004 -retorchportb=5001 -retorchportc=5002 -retorchporta=5000 -OpenViduImage=eexit/mirror-http-server +retorchporti=5030 +retorchportf=5027 +retorchportg=5028 +retorchportd=5025 +retorchporte=5026 +retorchportb=5023 +retorchportc=5024 +retorchporta=5022 +OpenViduImage=openvidu/openvidu-server-kms:1.7.0 diff --git a/retorchfiles/envfiles/tjobd.env b/retorchfiles/envfiles/tjobd.env index 30717a4..022d3b9 100644 --- a/retorchfiles/envfiles/tjobd.env +++ b/retorchfiles/envfiles/tjobd.env @@ -1,17 +1,17 @@ testsBasePath=./ tjobname=tjobd frontend_port=5000 -retorchportj=5020 -retorchportk=5021 -retorchporth=5018 +retorchportj=5042 +retorchportk=5043 +retorchporth=5040 mysqlImage=mysql:5.7.21 -retorchporti=5019 -retorchportf=5016 -retorchportg=5017 -retorchportd=5014 -retorchporte=5015 -retorchportb=5012 -retorchportc=5013 -retorchporta=5011 +retorchporti=5041 +retorchportf=5038 +retorchportg=5039 +retorchportd=5036 +retorchporte=5037 +retorchportb=5034 +retorchportc=5035 +retorchporta=5033 OpenViduImage=eexit/mirror-http-server diff --git a/retorchfiles/envfiles/tjobe.env b/retorchfiles/envfiles/tjobe.env index 844d9dd..c5a6162 100644 --- a/retorchfiles/envfiles/tjobe.env +++ b/retorchfiles/envfiles/tjobe.env @@ -1,17 +1,17 @@ testsBasePath=./ tjobname=tjobe frontend_port=5000 -retorchportj=5031 -retorchportk=5032 -retorchporth=5029 +retorchportj=5053 +retorchportk=5054 +retorchporth=5051 mysqlImage=mysql:5.7.21 -retorchporti=5030 -retorchportf=5027 -retorchportg=5028 -retorchportd=5025 -retorchporte=5026 -retorchportb=5023 -retorchportc=5024 -retorchporta=5022 -OpenViduImage=openvidu/openvidu-server-kms:1.7.0 +retorchporti=5052 +retorchportf=5049 +retorchportg=5050 +retorchportd=5047 +retorchporte=5048 +retorchportb=5045 +retorchportc=5046 +retorchporta=5044 +OpenViduImage=eexit/mirror-http-server diff --git a/retorchfiles/envfiles/tjobf.env b/retorchfiles/envfiles/tjobf.env index 4948a47..fce024c 100644 --- a/retorchfiles/envfiles/tjobf.env +++ b/retorchfiles/envfiles/tjobf.env @@ -1,17 +1,17 @@ testsBasePath=./ tjobname=tjobf frontend_port=5000 -retorchportj=5042 -retorchportk=5043 -retorchporth=5040 +retorchportj=5064 +retorchportk=5065 +retorchporth=5062 mysqlImage=mysql:5.7.21 -retorchporti=5041 -retorchportf=5038 -retorchportg=5039 -retorchportd=5036 -retorchporte=5037 -retorchportb=5034 -retorchportc=5035 -retorchporta=5033 +retorchporti=5063 +retorchportf=5060 +retorchportg=5061 +retorchportd=5058 +retorchporte=5059 +retorchportb=5056 +retorchportc=5057 +retorchporta=5055 OpenViduImage=eexit/mirror-http-server diff --git a/retorchfiles/envfiles/tjobg.env b/retorchfiles/envfiles/tjobg.env index 65642ed..217fb45 100644 --- a/retorchfiles/envfiles/tjobg.env +++ b/retorchfiles/envfiles/tjobg.env @@ -1,17 +1,17 @@ testsBasePath=./ tjobname=tjobg frontend_port=5000 -retorchportj=5053 -retorchportk=5054 -retorchporth=5051 +retorchportj=5075 +retorchportk=5076 +retorchporth=5073 mysqlImage=mysql:5.7.21 -retorchporti=5052 -retorchportf=5049 -retorchportg=5050 -retorchportd=5047 -retorchporte=5048 -retorchportb=5045 -retorchportc=5046 -retorchporta=5044 +retorchporti=5074 +retorchportf=5071 +retorchportg=5072 +retorchportd=5069 +retorchporte=5070 +retorchportb=5067 +retorchportc=5068 +retorchporta=5066 OpenViduImage=eexit/mirror-http-server diff --git a/retorchfiles/envfiles/tjobh.env b/retorchfiles/envfiles/tjobh.env index 9c78b43..43f6550 100644 --- a/retorchfiles/envfiles/tjobh.env +++ b/retorchfiles/envfiles/tjobh.env @@ -1,17 +1,17 @@ testsBasePath=./ tjobname=tjobh frontend_port=5000 -retorchportj=5064 -retorchportk=5065 -retorchporth=5062 +retorchportj=5086 +retorchportk=5087 +retorchporth=5084 mysqlImage=mysql:5.7.21 -retorchporti=5063 -retorchportf=5060 -retorchportg=5061 -retorchportd=5058 -retorchporte=5059 -retorchportb=5056 -retorchportc=5057 -retorchporta=5055 +retorchporti=5085 +retorchportf=5082 +retorchportg=5083 +retorchportd=5080 +retorchporte=5081 +retorchportb=5078 +retorchportc=5079 +retorchporta=5077 OpenViduImage=eexit/mirror-http-server diff --git a/retorchfiles/envfiles/tjobi.env b/retorchfiles/envfiles/tjobi.env index b245760..51570e5 100644 --- a/retorchfiles/envfiles/tjobi.env +++ b/retorchfiles/envfiles/tjobi.env @@ -1,17 +1,17 @@ testsBasePath=./ tjobname=tjobi frontend_port=5000 -retorchportj=5075 -retorchportk=5076 -retorchporth=5073 +retorchportj=5097 +retorchportk=5098 +retorchporth=5095 mysqlImage=mysql:5.7.21 -retorchporti=5074 -retorchportf=5071 -retorchportg=5072 -retorchportd=5069 -retorchporte=5070 -retorchportb=5067 -retorchportc=5068 -retorchporta=5066 +retorchporti=5096 +retorchportf=5093 +retorchportg=5094 +retorchportd=5091 +retorchporte=5092 +retorchportb=5089 +retorchportc=5090 +retorchporta=5088 OpenViduImage=eexit/mirror-http-server diff --git a/retorchfiles/envfiles/tjobj.env b/retorchfiles/envfiles/tjobj.env index 1c7081c..a0d1a99 100644 --- a/retorchfiles/envfiles/tjobj.env +++ b/retorchfiles/envfiles/tjobj.env @@ -1,17 +1,17 @@ testsBasePath=./ tjobname=tjobj frontend_port=5000 -retorchportj=5086 -retorchportk=5087 -retorchporth=5084 +retorchportj=5108 +retorchportk=5109 +retorchporth=5106 mysqlImage=mysql:5.7.21 -retorchporti=5085 -retorchportf=5082 -retorchportg=5083 -retorchportd=5080 -retorchporte=5081 -retorchportb=5078 -retorchportc=5079 -retorchporta=5077 +retorchporti=5107 +retorchportf=5104 +retorchportg=5105 +retorchportd=5102 +retorchporte=5103 +retorchportb=5100 +retorchportc=5101 +retorchporta=5099 OpenViduImage=eexit/mirror-http-server diff --git a/retorchfiles/envfiles/tjobk.env b/retorchfiles/envfiles/tjobk.env index 3fc301b..918a79c 100644 --- a/retorchfiles/envfiles/tjobk.env +++ b/retorchfiles/envfiles/tjobk.env @@ -1,17 +1,17 @@ testsBasePath=./ tjobname=tjobk frontend_port=5000 -retorchportj=5097 -retorchportk=5098 -retorchporth=5095 +retorchportj=5119 +retorchportk=5120 +retorchporth=5117 mysqlImage=mysql:5.7.21 -retorchporti=5096 -retorchportf=5093 -retorchportg=5094 -retorchportd=5091 -retorchporte=5092 -retorchportb=5089 -retorchportc=5090 -retorchporta=5088 -OpenViduImage=eexit/mirror-http-server +retorchporti=5118 +retorchportf=5115 +retorchportg=5116 +retorchportd=5113 +retorchporte=5114 +retorchportb=5111 +retorchportc=5112 +retorchporta=5110 +OpenViduImage=openvidu/openvidu-server-kms:1.7.0 diff --git a/retorchfiles/envfiles/tjobl.env b/retorchfiles/envfiles/tjobl.env index a95cd93..5919350 100644 --- a/retorchfiles/envfiles/tjobl.env +++ b/retorchfiles/envfiles/tjobl.env @@ -1,17 +1,17 @@ testsBasePath=./ tjobname=tjobl frontend_port=5000 -retorchportj=5108 -retorchportk=5109 -retorchporth=5106 +retorchportj=5130 +retorchportk=5131 +retorchporth=5128 mysqlImage=mysql:5.7.21 -retorchporti=5107 -retorchportf=5104 -retorchportg=5105 -retorchportd=5102 -retorchporte=5103 -retorchportb=5100 -retorchportc=5101 -retorchporta=5099 +retorchporti=5129 +retorchportf=5126 +retorchportg=5127 +retorchportd=5124 +retorchporte=5125 +retorchportb=5122 +retorchportc=5123 +retorchporta=5121 OpenViduImage=eexit/mirror-http-server diff --git a/retorchfiles/envfiles/tjobm.env b/retorchfiles/envfiles/tjobm.env deleted file mode 100644 index ac2be6f..0000000 --- a/retorchfiles/envfiles/tjobm.env +++ /dev/null @@ -1,17 +0,0 @@ -testsBasePath=./ -tjobname=tjobm -frontend_port=5000 -retorchportj=5119 -retorchportk=5120 -retorchporth=5117 -mysqlImage=mysql:5.7.21 -retorchporti=5118 -retorchportf=5115 -retorchportg=5116 -retorchportd=5113 -retorchporte=5114 -retorchportb=5111 -retorchportc=5112 -retorchporta=5110 -OpenViduImage=openvidu/openvidu-server-kms:1.7.0 - diff --git a/retorchfiles/envfiles/tjobn.env b/retorchfiles/envfiles/tjobn.env deleted file mode 100644 index 0895a12..0000000 --- a/retorchfiles/envfiles/tjobn.env +++ /dev/null @@ -1,17 +0,0 @@ -testsBasePath=./ -tjobname=tjobn -frontend_port=5000 -retorchportj=5130 -retorchportk=5131 -retorchporth=5128 -mysqlImage=mysql:5.7.21 -retorchporti=5129 -retorchportf=5126 -retorchportg=5127 -retorchportd=5124 -retorchporte=5125 -retorchportb=5122 -retorchportc=5123 -retorchporta=5121 -OpenViduImage=eexit/mirror-http-server - diff --git a/retorchfiles/resources/FullTeachingSystemResources.json b/retorchfiles/resources/FullTeachingSystemResources.json deleted file mode 100644 index f56c8a0..0000000 --- a/retorchfiles/resources/FullTeachingSystemResources.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "Configuration": { - "hierarchyParent": [ - "Course" - ], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelConfiguration", - "elasticity": 40, - "elasticityCost": 15.0 - }, - "resourceType": "LOGICAL", - "resourceID": "Configuration" - }, - "OpenViduMock": { - "hierarchyParent": [ - "OpenVidu" - ], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelOpenViduMock", - "elasticity": 30, - "elasticityCost": 10.0 - }, - "resourceType": "LOGICAL", - "resourceID": "OpenViduMock" - }, - "OpenVidu": { - "hierarchyParent": [], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelOpenVidu", - "elasticity": 1, - "elasticityCost": 300.0 - }, - "resourceType": "LOGICAL", - "resourceID": "OpenVidu" - }, - "Course": { - "hierarchyParent": [ - "MySQL" - ], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelCourse", - "elasticity": 5, - "elasticityCost": 100.0 - }, - "resourceType": "LOGICAL", - "resourceID": "Course" - }, - "Information": { - "hierarchyParent": [ - "Course" - ], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelInformation", - "elasticity": 20, - "elasticityCost": 15.0 - }, - "resourceType": "LOGICAL", - "resourceID": "Information" - }, - "Files": { - "hierarchyParent": [ - "Course" - ], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelFiles", - "elasticity": 20, - "elasticityCost": 15.0 - }, - "resourceType": "LOGICAL", - "resourceID": "Files" - }, - "Attenders": { - "hierarchyParent": [ - "Course" - ], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelAttenders", - "elasticity": 20, - "elasticityCost": 15.0 - }, - "resourceType": "LOGICAL", - "resourceID": "Attenders" - }, - "LoginService": { - "hierarchyParent": [ - "MySQL" - ], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelLoginService", - "elasticity": 5, - "elasticityCost": 30.0 - }, - "resourceType": "LOGICAL", - "resourceID": "LoginService" - }, - "Session": { - "hierarchyParent": [ - "Course" - ], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelSession", - "elasticity": 20, - "elasticityCost": 15.0 - }, - "resourceType": "LOGICAL", - "resourceID": "Session" - }, - "Forum": { - "hierarchyParent": [ - "Course" - ], - "replaceable": [], - "elasticityModel": { - "elasticityID": "elasModelForum", - "elasticity": 20, - "elasticityCost": 15.0 - }, - "resourceType": "LOGICAL", - "resourceID": "Forum" - } -} \ No newline at end of file diff --git a/retorchfiles/scripts/coilifecycles/coi-setup.sh b/retorchfiles/scripts/coilifecycles/coi-setup.sh index ac78b88..2c10f6d 100644 --- a/retorchfiles/scripts/coilifecycles/coi-setup.sh +++ b/retorchfiles/scripts/coilifecycles/coi-setup.sh @@ -1,4 +1,7 @@ #!/bin/bash +# The coi-setup.sh script provides all the necessary commands to set up the infrastructure before executing +# the TJobs. It performs debugging actions, such as outputting the kernel, library, and Docker versions. +# Additionally, it prunes and removes old videos and execution data. SEL_VIDEO_DIR="/opt/selenoid/video/" SEL_LOG_DIR="/opt/selenoid/logs/" @@ -7,10 +10,10 @@ SEL_LOG_DIR="/opt/selenoid/logs/" remove_old_files() { dir=$1 days=$2 - echo "Removing older files ($days days) in $dir! The number of files prior to remove:" + "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "COI-set-up" "Removing older files ($days days) in $dir! The number of files prior to remove:" find "$dir" | wc -l find "$dir" -mindepth 1 -maxdepth 1 -mtime +$days -exec rm -rf {} \; - echo "Removing older files ($days days) in $dir! The number of files after remove:" + "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "COI-set-up" "Removing older files ($days days) in $dir! The number of files after remove:" find "$dir" | wc -l } @@ -20,6 +23,15 @@ OUTPUTDIRCOI="$WORKSPACE/retorchcostestimationdata/exec$BUILD_NUMBER/COI.data" # Record start time for COI setup COISETUPSTART=$(date +%s%3N) +# Prompt some system information +docker_version=$(docker version) +docker_compose_version=$(docker compose version | awk '{print $4}') +curl_version=$(curl --version | head -n 1 | awk '{print $2}') +kernel_version=$(uname -r) +os_version=$(cat /etc/os-release | grep PRETTY_NAME | cut -d '"' -f 2) + +"$SCRIPTS_FOLDER/printLog.sh" "INFO" "COI-set-up" "Os version : $os_version, Kernel version: $kernel_version, Docker-compose version: $docker_compose_version, curl-version: $curl_version" +"$SCRIPTS_FOLDER/printLog.sh" "INFO" "COI-set-up" "Full Docker versions:\n $docker_version" # Remove older videos (older than 15 days) remove_old_files "$SEL_VIDEO_DIR" 15 @@ -34,9 +46,9 @@ mkdir -p "$SUT_LOCATION/tmp" # Pull Docker images echo "Pulling images" if docker pull selenoid/vnc_chrome:116.0 && docker pull selenoid/video-recorder:latest-release; then - echo "Images pulled successfully." + "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "COI-set-up" "Images pulled successfully." else - echo "Failed to pull Docker images." + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "COI-set-up" "Failed to pull Docker images." fi echo "Building images of SUT" @@ -47,9 +59,9 @@ docker compose -f "docker-compose.yml" --env-file "$WORKSPACE/retorchfiles/envfi # Check the exit status of the last command if [ $? -eq 0 ]; then - echo "Images for SUT" + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "COI-set-up" "Images for the SUT created sucessfully" else - echo "Failed to build images of SUT" + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "COI-set-up" "Failed to build images of SUT" exit 1 fi diff --git a/retorchfiles/scripts/coilifecycles/coi-teardown.sh b/retorchfiles/scripts/coilifecycles/coi-teardown.sh index 3bae4ce..eeb15fa 100644 --- a/retorchfiles/scripts/coilifecycles/coi-teardown.sh +++ b/retorchfiles/scripts/coilifecycles/coi-teardown.sh @@ -1,21 +1,52 @@ #!/bin/bash -set -e # Exit immediately if any command exits with a non-zero status +# The coi-teardown.sh script provides all the necessary commands to tear-down the infrastructure after executing +# the TJobs. It performs cleaning actions, like remove all the containers and docker volumes, but also ends, collects +# and creates file with the different TJob and COI lifecycles using the savetjoblifecycledata.sh script. COITEARDOWNSTART="$(date +%s%3N)" - -echo "Switch off all containers that start with *tjob*..." -docker rm $(docker stop $(docker ps -a -q --filter name=tjob --format="{{.ID}}") || echo 'Any Container to remove') || echo 'All the containers are removed!' - -echo "Pruning also its volumes" -docker volume prune --all -f +# Log the start of the container teardown process +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "COI-tear-down" "Switching off all containers that start with *tjob*..." +# Get the list of container IDs to stop and remove +container_ids=$(docker ps -a -q --filter name=tjob) +if [ -n "$container_ids" ]; then + # Stop the containers + if docker stop $container_ids; then + "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "COI-tear-down" "Successfully stopped containers: $container_ids" + else + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "COI-tear-down" "Failed to stop containers: $container_ids" + exit 1 + fi + # Collect volumes used by the containers + volumes_to_prune=$(docker ps -a --filter id="$container_ids" --format '{{.Mounts}}' | \ + grep -oP '(?<=type=volume,destination=\/)[^,]+') + # Remove the containers + if docker rm $container_ids; then + "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "COI-tear-down" "Successfully removed containers: $container_ids" + else + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "COI-tear-down" "Failed to remove containers: $container_ids" + exit 1 + fi + # Prune the collected volumes + if [ -n "$volumes_to_prune" ]; then + for volume in $volumes_to_prune; do + if docker volume rm "$volume"; then + log "DEBUG" "COI-tear-down" "Successfully removed volume: $volume" + else + log "ERROR" "COI-tear-down" "Failed to remove volume: $volume" + fi + done + else + "$SCRIPTS_FOLDER/printLog.sh" "INFO" "COI-tear-down" "No volumes associated with containers to prune." + fi +else + "$SCRIPTS_FOLDER/printLog.sh" "INFO" "COI-tear-down" "No containers with names starting with 'tjob' found to stop and remove." +fi +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "COI-tear-down" "Teardown process completed successfully." # Run saveTJobLifecycledata.sh script echo "Running saveTJobLifecycledata.sh script..." sh "$SCRIPTS_FOLDER/savetjoblifecycledata.sh" - COITEARDOWNEND="$(date +%s%3N)" - OUTPUTDIRCOI="$WORKSPACE/retorchcostestimationdata/exec$BUILD_NUMBER/COI.data" echo -n ";$COITEARDOWNSTART;$COITEARDOWNEND" >> "$OUTPUTDIRCOI" - -echo "COI teardown script completed successfully." +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "COI-tear-down" "Script completed successfully." diff --git a/retorchfiles/scripts/printLog.sh b/retorchfiles/scripts/printLog.sh new file mode 100644 index 0000000..e3c96be --- /dev/null +++ b/retorchfiles/scripts/printLog.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# The printlog.sh script provides a template for outputting formatted messages during the setup, execution +# and teardown of TJobs and COI. +if [ "$#" -ne 3 ]; then + echo "Usage: $0 " + exit 1 +fi +echo "[$(date +"%Y-%m-%d %T")] [$1] [$2] - $3" diff --git a/retorchfiles/scripts/savetjoblifecycledata.sh b/retorchfiles/scripts/savetjoblifecycledata.sh index b660324..69a8287 100644 --- a/retorchfiles/scripts/savetjoblifecycledata.sh +++ b/retorchfiles/scripts/savetjoblifecycledata.sh @@ -1,9 +1,12 @@ #!/bin/bash -set -e +# The savetjoblifecycledata.sh script generates a CSV file containing the durations of different TJob lifecycles. +# It collects the previously generated files using the base-writetime.sh script and combines them into a single file +# with all the durations, which can later be processed. +set -e # Check if the correct number of arguments is provided if [ "$#" -ne 0 ]; then - echo "This script doesn't take any parameter" + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "CreationTimeFile" "This script doesn't take any parameter" exit 1 fi @@ -23,7 +26,7 @@ for csvfile in $PATH_FILES; do tail -n +2 "$OUTPUT_DIR_COI" | rev | cut -d ';' -f 1 | rev } >>"$OUTPUT_FILE" else - echo "Error: One or more files do not exist." + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "CreationTimeFile" "Error: One or more files do not exist." exit 1 fi done diff --git a/retorchfiles/scripts/storeContainerLogs.sh b/retorchfiles/scripts/storeContainerLogs.sh new file mode 100644 index 0000000..e64f9b7 --- /dev/null +++ b/retorchfiles/scripts/storeContainerLogs.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# The storeContainerLogs.sh script executes a docker log command for each container that belongs to the current +# execution plan. The logs are stored into a separate files for then being archived as an artifact. + +"$SCRIPTS_FOLDER/printLog.sh" "ERROR" "SaveContainerLogs" "Starting to store container logs!" + # Store docker logs + DIRECTORY_PATH="$WORKSPACE/target/containerlogs/$1" + + if [ ! -d "$DIRECTORY_PATH" ]; then + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "SaveContainerLogs" "Directory for storing logs doesnt exist creating..." + mkdir -p $DIRECTORY_PATH + fi + + for CONTAINER_NAME in $(docker ps -a --format "{{.Names}}" --filter Name=$1); do + "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "SaveContainerLogs" "Storing log container $CONTAINER_NAME in TJob $1" + docker logs $CONTAINER_NAME &>"$DIRECTORY_PATH/$CONTAINER_NAME.log" + done +echo "Storing of logs finished" diff --git a/retorchfiles/scripts/tjoblifecycles/tjob-setup.sh b/retorchfiles/scripts/tjoblifecycles/tjob-setup.sh index 4d9479c..36c9f1e 100644 --- a/retorchfiles/scripts/tjoblifecycles/tjob-setup.sh +++ b/retorchfiles/scripts/tjoblifecycles/tjob-setup.sh @@ -1,28 +1,42 @@ #!/bin/bash -set -e +# The tjob-setup.sh script provides all the necessary commands to set up each TJob's resources before executing +# the TJobs. It includes a placeholder {CUSTOM_SETUP_COMMANDS} where the commands from the custom-tjob-setup file +# are inserted. The script deploys the required test Resources using Docker Compose and waits for the SUT to be ready +# by invoking the waitforSUT.sh script. + # Execute the script to write timestamp "$SCRIPTS_FOLDER/writetime.sh" "$2" "$1" - # Export Docker Host IP DOCKER_HOST_IP=$(/sbin/ip route | awk '/default/ { print $3 }') export DOCKER_HOST_IP -echo "Exporting the HOST_IP: $DOCKER_HOST_IP" - -# Custom Set-up commands -echo "Executing custom commands" - +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-set-up" "Exporting the HOST_IP: $DOCKER_HOST_IP" +# START Custom Set-up commands +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-set-up" "Start executing custom commands" +echo "This TJOB Setup dont have any kind of specific commands" +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-set-up" "End executing custom commands" +# END Custom Set-up commands # Deploy containers cd "$SUT_LOCATION" -echo "Deploying containers for TJOB $1" +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-set-up" "Deploying containers for TJOB $1" docker compose -f docker-compose.yml --env-file "$WORKSPACE/retorchfiles/envfiles/$1.env" --ansi never -p "$1" up -d -echo "Waiting for the system to be up..." +if [ $? -ne 0 ]; then + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "$1-set-up" "Docker compose failed,writing end time of the set-up" + "$SCRIPTS_FOLDER/writetime.sh" "$2" "$1" + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "$1-set-up" "Docker compose failed,writing end time of the test execution" + "$SCRIPTS_FOLDER/writetime.sh" "$2" "$1" + "$SCRIPTS_FOLDER/writetime.sh" "$2" "$1" + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "$1-set-up" "Exiting" + exit 1 +else + "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-set-up" "Docker compose successful!" +fi +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-set-up" "Waiting for the system to be up..." "$WORKSPACE/retorchfiles/scripts/waitforSUT.sh" "$1" cd "$WORKSPACE" - -echo "System READY!! Test execution can start!" - +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-set-up" "System READY!! Test execution can start!" # Execute the script to write timestamp again "$SCRIPTS_FOLDER/writetime.sh" "$2" "$1" +exit 0 diff --git a/retorchfiles/scripts/tjoblifecycles/tjob-teardown.sh b/retorchfiles/scripts/tjoblifecycles/tjob-teardown.sh index 2f2cf85..ff6ae09 100644 --- a/retorchfiles/scripts/tjoblifecycles/tjob-teardown.sh +++ b/retorchfiles/scripts/tjoblifecycles/tjob-teardown.sh @@ -1,32 +1,25 @@ #!/bin/bash -set -e +# The tjob-teardown.sh script provides all the necessary commands to tear-down each TJob's Resources after the +# test execution has ended. It stores the container logs of the current TJob, tear down the containers +# and execute the custom commands provided in the custom-tjob-teardown file. +set -e # Execute the script to write timestamp "$SCRIPTS_FOLDER/writetime.sh" "$2" "$1" - +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-tear-down" "Starting the TJob tear-down" # Store docker logs -DIRECTORY_PATH="$WORKSPACE/target/containerlogs/$1" - -if [ ! -d "$DIRECTORY_PATH" ]; then - echo "Directory for storing logs doesnt exist creating..." - mkdir -p $DIRECTORY_PATH -fi - -for CONTAINER_NAME in $(docker ps -a --format "{{.Names}}" --filter Name=$1); do - echo "Storing lof con container $CONTAINER_NAME in TJob $1" - docker logs $CONTAINER_NAME &>"$DIRECTORY_PATH/$CONTAINER_NAME.log" -done +"$WORKSPACE/retorchfiles/scripts/storeContainerLogs.sh" "$1" # Change to SUT location cd "$SUT_LOCATION" # Tear down Docker containers and volumes -echo "Tearing down Docker containers and volumes for TJOB $1" +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-tear-down" "Tearing down Docker containers and volumes for TJOB $1" docker compose -f docker-compose.yml --env-file "$WORKSPACE/retorchfiles/envfiles/$1.env" --ansi never -p "$1" down --volumes # Return to the original working directory cd "$WORKSPACE" - +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-tear-down" "Tear-down ended" # Execute the script to write timestamp again "$SCRIPTS_FOLDER/writetime.sh" "$2" "$1" diff --git a/retorchfiles/scripts/tjoblifecycles/tjob-testexecution.sh b/retorchfiles/scripts/tjoblifecycles/tjob-testexecution.sh index 497a2fe..22b2b01 100644 --- a/retorchfiles/scripts/tjoblifecycles/tjob-testexecution.sh +++ b/retorchfiles/scripts/tjoblifecycles/tjob-testexecution.sh @@ -1,4 +1,7 @@ #!/bin/bash +# The testexecution.sh script executes the test cases, providing them with the URL and port where the SUT is available. +# It also measures the execution time and marks the pipeline as failed if any test case fails. + set -e # Function to execute timestamp script EXECUTE_TIMESTAMP_SCRIPT() { @@ -9,7 +12,7 @@ EXECUTE_TIMESTAMP_SCRIPT() { # Check if the required parameters are provided if [ "$#" -lt 5 ]; then - echo "Usage: $0 " + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "$1-test-execution" "Usage: $0 " exit 1 fi # Constants @@ -20,23 +23,23 @@ STAGE="$2" PORT="$4" TEST_NAME="$5" if [[ $3 == "https://" || $3 == "http://" ]]; then - echo "Only http:// || https:// protocol provided, using HOST DOCKER INTERNAL IP " + "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-test-execution" "Only http:// || https:// protocol provided, using HOST DOCKER INTERNAL IP " SUT_URL="$3$DOCKER_HOST_IP" else - echo "Using the provided URL" + "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-test-execution" "Using the provided URL" SUT_URL="$3" fi -echo "The URL IS $SUT_URL" +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-test-execution" "The URL IS $SUT_URL" # Execute the script to write timestamp EXECUTE_TIMESTAMP_SCRIPT "$STAGE" "$TJOB_NAME" # Display HOST_IP and PORT information -echo "The HOST_IP is: $DOCKER_HOST_IP and PORT $PORT for the TJOB $TJOB_NAME" +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-test-execution" "The HOST_IP is: $DOCKER_HOST_IP and PORT $PORT for the TJOB $TJOB_NAME" LOCALHOST="$DOCKER_HOST_IP:$PORT" # Run Maven test -mvn test -Ddirtarget="$TJOBNAME" -Dtest="$TEST_NAME" -Dtjob_name="$TJOB_NAME" -DSUT_URL="$SUT_URL" -DSUT_PORT="$PORT" +mvn test -Dtest="$TEST_NAME" -Dtjob_name="$TJOB_NAME" -DSUT_URL="$SUT_URL" -DSUT_PORT="$PORT" # Store Test result MVN_EXIT_CODE=$? @@ -46,11 +49,11 @@ EXECUTE_TIMESTAMP_SCRIPT "$STAGE" "$TJOB_NAME" # Check if Maven test failed if [ $MVN_EXIT_CODE -ne 0 ]; then - echo "Maven test FAILED with exit code $MVN_EXIT_CODE." + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "$1-test-execution" "Maven test FAILED with exit code $MVN_EXIT_CODE." exit 1 # Return 1 if the Maven test fails fi # If the script reaches here, the Maven test succeeded -echo "Maven test succeeded." +"$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "$1-test-execution" "Maven test succeeded." exit 0 diff --git a/retorchfiles/scripts/waitforSUT.sh b/retorchfiles/scripts/waitforSUT.sh index 55cda36..53e9cc4 100644 --- a/retorchfiles/scripts/waitforSUT.sh +++ b/retorchfiles/scripts/waitforSUT.sh @@ -1,6 +1,9 @@ #!/bin/bash +# The waitforSUT.sh script waits for the readiness of the SUT frontend. It performs a wait of up to 200 seconds, +# checking the frontend every 5 seconds. If the SUT is not ready after this period, all containers are teared down. + if [ "$#" -ne 1 ]; then - echo "Usage: $0 " + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "TJob-$1-set-up" "Usage: $0 " exit 1 fi DOCKER_HOST_IP=$(/sbin/ip route | awk '/default/ { print $3 }') @@ -8,12 +11,15 @@ COUNTER=0 WAIT_LIMIT=40 while ! curl --insecure -s "https://full-teaching-$1:5000" | grep -q "FullTeaching"; do - echo "Waiting $COUNTER seconds for $1 with URL https://full-teaching-$1:5000" + "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "TJob-$1-set-up" "Waiting $COUNTER seconds for $1 with URL https://full-teaching-$1:5000" sleep 5 ((COUNTER++)) if ((COUNTER > WAIT_LIMIT)); then - echo "The container is down" + "$SCRIPTS_FOLDER/printLog.sh" "DEBUG" "TJob-$1-set-up" "SUT is down, making a preventive tear-down and storing the logs" + "$WORKSPACE/retorchfiles/scripts/storeContainerLogs.sh" "$1" + # Tearing down the system. + docker compose -f docker-compose.yml --env-file "$WORKSPACE/retorchfiles/envfiles/$1.env" --ansi never -p "$1" down --volumes exit 1 fi done diff --git a/retorchfiles/scripts/writetime.sh b/retorchfiles/scripts/writetime.sh index dea11af..2257491 100644 --- a/retorchfiles/scripts/writetime.sh +++ b/retorchfiles/scripts/writetime.sh @@ -1,8 +1,10 @@ #!/bin/bash +# The writetime.sh script appends different timestamps for each TJob to a separate file. These files are then +# processed and combined into a single file containing all COI and TJob lifecycle durations. # Check if the correct number of parameters is provided if [ "$#" -ne 2 ]; then - echo "Usage: $0 " + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "writeTime-$1" "Usage: $0 " exit 1 fi STAGE=$2 @@ -16,7 +18,7 @@ append_timestamp() { if [ -f "$1" ]; then echo -n ";$(date +%s%3N)" >>"$1" else - echo "Error: File $1 does not exist." + "$SCRIPTS_FOLDER/printLog.sh" "ERROR" "writeTime-$1" "Error: File $1 does not exist." exit 1 fi } diff --git a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/LoggedForumTest.java b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/LoggedForumTest.java index bb76db3..4bff049 100644 --- a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/LoggedForumTest.java +++ b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/LoggedForumTest.java @@ -55,13 +55,13 @@ public static Stream data() throws IOException { * someone that have comments on it.Finally, with the two previous conditions, * makes an assertEquals() to ensure that both are accomplishment */ - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {"Forum"}) - @AccessMode(resID = "Course", concurrency = 10, sharing = true, accessMode = "READONLY") - @DisplayName("studentCourseMainTest") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "forum", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") + @DisplayName("forumLoadEntriesTest") @ParameterizedTest @MethodSource("data") void forumLoadEntriesTest(String mail, String password, String role) throws NotLoggedException, ElementNotFoundException, InterruptedException { //47lines +115 +28 set up +13 lines teardown =203 @@ -120,13 +120,13 @@ void forumLoadEntriesTest(String mail, String password, String role) throws NotL * the entry was created correctly and ensures that there are only one comment that * corresponds with the body of that entry. */ - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {"Forum"}) - @AccessMode(resID = "Course", concurrency = 1, sharing = false, accessMode = "READWRITE") - @DisplayName("studentCourseMainTest") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "forum", concurrency = 1, sharing = false, accessMode = "READWRITE") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") + @DisplayName("forumNewEntryTest") @ParameterizedTest @MethodSource("data") void forumNewEntryTest(String mail, String password, String role) throws NotLoggedException, ElementNotFoundException, InterruptedException {// 48+ 104 + 28 set up +13 lines teardown =193 @@ -194,12 +194,12 @@ void forumNewEntryTest(String mail, String password, String role) throws NotLogg * in this entry with the custom content(the current date and hour).Finally, we iterate * over all comments looking for the comment that previously we create. */ - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {"Forum"}) - @AccessMode(resID = "Course", concurrency = 1, sharing = false, accessMode = "READWRITE") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "forum", concurrency = 1, sharing = false, accessMode = "READWRITE") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @DisplayName("forumNewCommentTest") @ParameterizedTest @MethodSource("data") @@ -281,12 +281,12 @@ void forumNewCommentTest(String mail, String password, String role) throws NotLo * previously created, go to the first and replies to the same comment.After it, we check * that the comment was correctly published. */ - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {"Forum"}) - @AccessMode(resID = "Course", concurrency = 1, sharing = false, accessMode = "READWRITE") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "forum", concurrency = 1, sharing = false, accessMode = "READWRITE") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @DisplayName("forumNewReply2CommentTest") @ParameterizedTest @MethodSource("data") diff --git a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/LoggedLinksTests.java b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/LoggedLinksTests.java index 0e7c8cc..49b5191 100644 --- a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/LoggedLinksTests.java +++ b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/LoggedLinksTests.java @@ -48,12 +48,12 @@ public static Stream data() throws IOException { */ - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {}) - @AccessMode(resID = "Course", concurrency = 15, sharing = true, accessMode = "READWRITE") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "course", concurrency = 15, sharing = true, accessMode = "READWRITE") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @ParameterizedTest @MethodSource("data") @DisplayName("spiderLoggedTest") diff --git a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/UnLoggedLinksTests.java b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/UnLoggedLinksTests.java index f0d7ad9..4edc480 100644 --- a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/UnLoggedLinksTests.java +++ b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/UnLoggedLinksTests.java @@ -31,12 +31,12 @@ public static Stream data() throws IOException { return ParameterLoader.getTestTeachers(); } - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {}) - @AccessMode(resID = "Course", concurrency = 15, sharing = true, accessMode = "READWRITE") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "course", concurrency = 15, sharing = true, accessMode = "READWRITE") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @ParameterizedTest @MethodSource("data") @DisplayName("spiderUnloggedTest") diff --git a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/UserTest.java b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/UserTest.java index f1cde9b..16bb09f 100644 --- a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/UserTest.java +++ b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/UserTest.java @@ -29,10 +29,11 @@ public static Stream data() throws IOException { * was logged correctly */ - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @ParameterizedTest @MethodSource("data") @DisplayName("loginTest") diff --git a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingEndToEndEChatTests.java b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingEndToEndEChatTests.java index 1f6dcfb..92e472f 100644 --- a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingEndToEndEChatTests.java +++ b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingEndToEndEChatTests.java @@ -59,12 +59,12 @@ public static Stream data() throws IOException { return ParameterLoader.getTestTeachers(); } - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "READWRITE") - @Resource(resID = "Course", replaceable = {"Configuration"}) - @AccessMode(resID = "Course", concurrency = 1, sharing = false, accessMode = "READONLY") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidu", concurrency = 10, sharing = true, accessMode = "READWRITE") + @AccessMode(resID = "configuration", concurrency = 1, sharing = false, accessMode = "READONLY") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @DisplayName("oneToOneChatInSessionChrome") @ParameterizedTest @MethodSource("data") diff --git a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingEndToEndRESTTests.java b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingEndToEndRESTTests.java index 43afe64..f2d98bc 100644 --- a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingEndToEndRESTTests.java +++ b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingEndToEndRESTTests.java @@ -68,12 +68,12 @@ public FullTeachingEndToEndRESTTests() { /*** ClassRule methods ***/ - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {"Configuration"}) - @AccessMode(resID = "Course", concurrency = 1, sharing = false, accessMode = "READWRITE") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "configuration", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @DisplayName("courseRestOperations") @ParameterizedTest @MethodSource("data") @@ -104,12 +104,12 @@ private void editCourse() { user.waitUntil(ExpectedConditions.textToBe(By.cssSelector("#course-list .course-list-item:last-child div.course-title span"), editedCourseName), "Unexpected course name"); } - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {"Information"}) - @AccessMode(resID = "Course", concurrency = 1, sharing = false, accessMode = "READWRITE") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "information", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @DisplayName("courseInfoRestOperations") @ParameterizedTest @MethodSource("data") @@ -128,12 +128,12 @@ void courseInfoRestOperations(String mail, String password, String role) throws CourseNavigationUtilities.deleteCourse(user.getDriver(), COURSE_NAME); } - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {"Session"}) - @AccessMode(resID = "Course", concurrency = 1, sharing = false, accessMode = "READWRITE") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "session", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @DisplayName("sessionRestOperations") @ParameterizedTest @MethodSource("data") @@ -211,12 +211,12 @@ private void verifySessionDetails(String expectedTitle, String expectedComment, Assertions.assertTrue(actualDateTime.equals(expectedDateTime1) || actualDateTime.equals(expectedDateTime2)); } - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {"Forum"}) - @AccessMode(resID = "Course", concurrency = 1, sharing = false, accessMode = "READWRITE") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "forum", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @DisplayName("forumRestOperations") @ParameterizedTest @MethodSource("data") @@ -285,12 +285,12 @@ void forumRestOperations(String mail, String password, String role) throws Eleme CourseNavigationUtilities.deleteCourse(user.getDriver(), COURSE_NAME); } - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {"Files"}) - @AccessMode(resID = "Course", concurrency = 1, sharing = false, accessMode = "READWRITE") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "files", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @DisplayName("filesRestOperations") @ParameterizedTest @MethodSource("data") @@ -388,12 +388,12 @@ void filesRestOperations(String mail, String password, String role) throws Eleme CourseNavigationUtilities.deleteCourse(user.getDriver(), COURSE_NAME); } - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {"Attenders"}) - @AccessMode(resID = "Course", concurrency = 1, sharing = false, accessMode = "READWRITE") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "attenders", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @DisplayName("attendersRestOperations") @ParameterizedTest @MethodSource("data") diff --git a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingLoggedVideoSessionTests.java b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingLoggedVideoSessionTests.java index ab49212..4145e33 100644 --- a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingLoggedVideoSessionTests.java +++ b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingLoggedVideoSessionTests.java @@ -58,12 +58,12 @@ public static Stream data() throws IOException { * It includes creating a session, joining the session as a teacher and students, * leaving the session, and deleting the session. */ - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "READWRITE") - @Resource(resID = "Course", replaceable = {"Session"}) - @AccessMode(resID = "Course", concurrency = 1, sharing = false, accessMode = "READONLY") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidu", concurrency = 10, sharing = true, accessMode = "READWRITE") + @AccessMode(resID = "session", concurrency = 1, accessMode = "READONLY") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @DisplayName("sessionTest") @ParameterizedTest @MethodSource("data") diff --git a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingTestEndToEndVideoSessionTests.java b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingTestEndToEndVideoSessionTests.java index a5aaed3..604633b 100644 --- a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingTestEndToEndVideoSessionTests.java +++ b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/media/FullTeachingTestEndToEndVideoSessionTests.java @@ -57,13 +57,13 @@ public FullTeachingTestEndToEndVideoSessionTests() { } - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "READWRITE") - @Resource(resID = "Course", replaceable = {"Session"}) - @AccessMode(resID = "Course", concurrency = 1, sharing = false, accessMode = "READWRITE") - @DisplayName("sessionTest") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidu", concurrency = 10, sharing = true, accessMode = "READWRITE") + @AccessMode(resID = "session", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") + @DisplayName("oneToOneVideoAudioSessionChrome") @ParameterizedTest @MethodSource("data") void oneToOneVideoAudioSessionChrome(String mail, String password, String role) throws URISyntaxException, MalformedURLException, NotLoggedException, ElementNotFoundException, InterruptedException { //124+ 232+ 20 set up +8 lines teardown = 564 diff --git a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/student/CourseStudentTest.java b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/student/CourseStudentTest.java index 6043914..61d980c 100644 --- a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/student/CourseStudentTest.java +++ b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/student/CourseStudentTest.java @@ -37,12 +37,12 @@ public static Stream data() throws IOException { * and wait for the visibility of it.In second place, the student go to the home, * Session,Forum, Files and attenders tab to check if they are visible. */ - @Resource(resID = "Course", replaceable = {}) - @AccessMode(resID = "Course", concurrency = 15, sharing = true, accessMode = "READONLY") - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "course", concurrency = 15, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @DisplayName("studentCourseMainTest") @ParameterizedTest @MethodSource("data") diff --git a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/teacher/CourseTeacherTest.java b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/teacher/CourseTeacherTest.java index cac5c86..13e00e8 100644 --- a/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/teacher/CourseTeacherTest.java +++ b/src/test/java/com/fullteaching/e2e/no_elastest/functional/test/teacher/CourseTeacherTest.java @@ -39,12 +39,12 @@ public static Stream data() throws IOException { * course.Once the user it's here, it clicks upon the different tabs(Course info,sessions,Forum,Files * and attenders), checking that the navigation its possible. */ - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {}) - @AccessMode(resID = "Course", concurrency = 15, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "course", concurrency = 15, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @ParameterizedTest @MethodSource("data") void teacherCourseMainTest(String mail, String password, String role) throws NotLoggedException, ElementNotFoundException, InterruptedException {//39+80+ 28 set up +13 lines teardown =160 @@ -94,12 +94,12 @@ void teacherCourseMainTest(String mail, String password, String role) throws Not * into the edit icon, check the box that allows it and clicking into the delete button * After that, we proceed to check if the course don't appear in the list. */ - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {}) - @AccessMode(resID = "Course", concurrency = 15, sharing = true, accessMode = "DYNAMIC") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "course", concurrency = 15, sharing = true, accessMode = "DYNAMIC") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @ParameterizedTest @MethodSource("data") void teacherCreateAndDeleteCourseTest(String mail, String password, String role) throws ElementNotFoundException, NotLoggedException, InterruptedException { @@ -134,12 +134,13 @@ void teacherCreateAndDeleteCourseTest(String mail, String password, String role) * this test check if the current user, that is accessing to the course, is included * in the Attenders list( check if the user is in it) */ - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {"Configuration"}) - @AccessMode(resID = "Course", concurrency = 1, sharing = false, accessMode = "READWRITE") + + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "configuration", concurrency = 1, sharing = false, accessMode = "READWRITE") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @ParameterizedTest @MethodSource("data") void teacherEditCourseValues(String mail, String password, String role) throws NotLoggedException, ElementNotFoundException, InterruptedException {//165+256+ 28 set up +13 lines teardown =462 @@ -298,12 +299,12 @@ void teacherEditCourseValues(String mail, String password, String role) throws N //Well done! } - @Resource(resID = "LoginService", replaceable = {}) - @AccessMode(resID = "LoginService", concurrency = 10, sharing = true, accessMode = "READONLY") - @Resource(resID = "OpenVidu", replaceable = {"OpenViduMock"}) - @AccessMode(resID = "OpenVidu", concurrency = 10, sharing = true, accessMode = "NOACCESS") - @Resource(resID = "Course", replaceable = {}) - @AccessMode(resID = "Course", concurrency = 1, sharing = false, accessMode = "READWRITE") + @AccessMode(resID = "loginservice", concurrency = 10, sharing = true, accessMode = "READONLY") + @AccessMode(resID = "openvidumock", concurrency = 10, sharing = true, accessMode = "NOACCESS") + @AccessMode(resID = "course", concurrency = 1, sharing = false, accessMode = "READWRITE") + @AccessMode(resID = "executor", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webbrowser", concurrency = 1, accessMode = "READWRITE") + @AccessMode(resID = "webserver", concurrency = 1, accessMode = "READWRITE") @ParameterizedTest @MethodSource("data") void teacherDeleteCourseTest(String mail, String password, String role) throws ElementNotFoundException, NotLoggedException, InterruptedException {//51+114+28 set up +13 lines teardown =206