From 7d52d21bc16de91c3f0d11aa82d97699b6ca5d31 Mon Sep 17 00:00:00 2001 From: aurelien Date: Tue, 1 Jun 2021 16:50:45 +0200 Subject: [PATCH] =?UTF-8?q?cr=C3=A9ation=20utilisateurs=20chef=20et=20ense?= =?UTF-8?q?ignant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 7 +- .envmodel | 10 + 01_creation_departement_test.py | 6 +- 02_creation_formation_test.py | 6 +- 03_etudiant_test.py | 10 +- 04_creation_absence_test.py | 39 +- 05_saisie_note_test.py | 44 +- __pycache__/setting.cpython-37.pyc | Bin 666 -> 697 bytes geckodriver.log | 684 +++++++++++++++++++++++++++++ readme.md | 9 + setting.py | 3 +- setup.py | 10 - 12 files changed, 789 insertions(+), 39 deletions(-) create mode 100644 .envmodel delete mode 100644 setup.py diff --git a/.env b/.env index 98c99a0..47347ca 100644 --- a/.env +++ b/.env @@ -2,9 +2,10 @@ BASE_URL = "https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/" NOM_DPT = "test01" SCODOC_ADMIN_ID = "admin" SCODOC_ADMIN_PASS = "root_pass_42" -SCODOC_ENS_ID = "enseignantUS" +SCODOC_ENS_ID = "enseignant" SCODOC_ENS_PASS = "enseignant@" -SCODOC_CHEF_ID = "chefdesetudesUS" +SCODOC_CHEF_ID = "chefdesetudes" SCODOC_CHEF_PASS = "passwordUS42" LINK_SCODOC_SERVER = "root@scodoc-dev-iutinfo.univ-lille.fr" -BASE_NOT_SECURED_URL = "scodoc-dev-iutinfo.univ-lille.fr/" \ No newline at end of file +BASE_NOT_SECURED_URL = "scodoc-dev-iutinfo.univ-lille.fr/" +NAVIGATEUR = "firefox" \ No newline at end of file diff --git a/.envmodel b/.envmodel new file mode 100644 index 0000000..d03b431 --- /dev/null +++ b/.envmodel @@ -0,0 +1,10 @@ +BASE_URL = "https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/" +NOM_DPT = "test01" +SCODOC_ADMIN_ID = "admin_id" +SCODOC_ADMIN_PASS = "admin_password" +SCODOC_ENS_ID = "enseignant_id" +SCODOC_ENS_PASS = "enseignant_password" +SCODOC_CHEF_ID = "chef_id" +SCODOC_CHEF_PASS = "password" +LINK_SCODOC_SERVER = "root@ssh_server_scodoc" +BASE_NOT_SECURED_URL = "scodoc-dev-iutinfo.univ-lille.fr/" \ No newline at end of file diff --git a/01_creation_departement_test.py b/01_creation_departement_test.py index 2bb2110..c2e07bf 100644 --- a/01_creation_departement_test.py +++ b/01_creation_departement_test.py @@ -9,6 +9,7 @@ from setting import ( NOM_DPT, LINK_SCODOC_SERVER, BASE_NOT_SECURED_URL, + NAVIGATEUR, ) from selenium import webdriver from selenium.webdriver.common.keys import Keys @@ -22,7 +23,10 @@ class PythonOrgSearch(unittest.TestCase): process.wait() # Permet de se connecter et se remettre sur la page d'accueil avant chaque test def setUp(self): - self.driver = webdriver.Firefox() + if NAVIGATEUR == "firefox": + self.driver = webdriver.Firefox() + else: + self.driver = webdriver.Chrome() self.driver.get( "https://" + SCODOC_ADMIN_ID diff --git a/02_creation_formation_test.py b/02_creation_formation_test.py index 361b21c..66c62d6 100644 --- a/02_creation_formation_test.py +++ b/02_creation_formation_test.py @@ -9,6 +9,7 @@ from setting import ( NOM_DPT, LINK_SCODOC_SERVER, BASE_NOT_SECURED_URL, + NAVIGATEUR, ) from selenium import webdriver from selenium.webdriver.support import expected_conditions as EC @@ -29,7 +30,10 @@ class PythonOrgSearch(unittest.TestCase): process.wait() # Permet de se connecter et se remettre sur la page d'accueil avant chaque test def setUp(self): - self.driver = webdriver.Firefox() + if NAVIGATEUR == "firefox": + self.driver = webdriver.Firefox() + else: + self.driver = webdriver.Chrome() self.wait = WebDriverWait(self.driver, 10) self.driver.get( "https://" diff --git a/03_etudiant_test.py b/03_etudiant_test.py index a26f5b3..159db70 100644 --- a/03_etudiant_test.py +++ b/03_etudiant_test.py @@ -8,6 +8,7 @@ from setting import ( NOM_DPT, LINK_SCODOC_SERVER, BASE_NOT_SECURED_URL, + NAVIGATEUR, ) import urllib.parse as urlparse from urllib.parse import parse_qs @@ -19,8 +20,8 @@ from selenium.webdriver.support.ui import Select, WebDriverWait from selenium.webdriver.support.select import Select URL = BASE_URL + NOM_DPT + "/Scolarite" -nomEtu = "UnAutreEtudiant" -prenomEtu = "Normal" +nomEtu = "Semestre11" +prenomEtu = "Etudiant1" nip = "11122234" domicile = "50 rue de la marmite" codepostaldomicile = "59000" @@ -41,7 +42,10 @@ class PythonOrgSearch(unittest.TestCase): process.wait() # Permet de se connecter et se remettre sur la page d'accueil avant chaque test def setUp(self): - self.driver = webdriver.Firefox() + if NAVIGATEUR == "firefox": + self.driver = webdriver.Firefox() + else: + self.driver = webdriver.Chrome() self.wait = WebDriverWait(self.driver, 10) self.driver.get( "https://" diff --git a/04_creation_absence_test.py b/04_creation_absence_test.py index 52f2978..3440637 100644 --- a/04_creation_absence_test.py +++ b/04_creation_absence_test.py @@ -9,6 +9,7 @@ from setting import ( NOM_DPT, LINK_SCODOC_SERVER, BASE_NOT_SECURED_URL, + NAVIGATEUR, ) from urllib.parse import parse_qs from selenium import webdriver @@ -18,8 +19,10 @@ from selenium.webdriver.support.ui import Select, WebDriverWait from selenium.webdriver.support.select import Select URL = BASE_URL + NOM_DPT + "/Scolarite" -NOM_ETU = "Semestre1" +NOM_ETU = "Semestre11" PRENOM_ETU = "EtudiantNumero1" +dateDebutAbsenceNonJustifiee = "31/05/2021" +dateDebutAbsenceJustifiee = "30/05/2021" class PythonOrgSearch(unittest.TestCase): @@ -36,7 +39,10 @@ class PythonOrgSearch(unittest.TestCase): process.wait() # Permet de se connecter et se remettre sur la page d'accueil avant chaque test def setUp(self): - self.driver = webdriver.Firefox() + if NAVIGATEUR == "firefox": + self.driver = webdriver.Firefox() + else: + self.driver = webdriver.Chrome() self.wait = WebDriverWait(self.driver, 10) self.driver.get( "https://" @@ -58,17 +64,15 @@ class PythonOrgSearch(unittest.TestCase): element.send_keys(NOM_ETU) element.submit() self.wait.until(EC.url_changes(URL)) - driver.find_element_by_xpath("//a[contains(text(),'Etudiantnumero1')]").click() - time.sleep(5) URL = driver.current_url - self.assertTrue(NOM_ETU in driver.page_source) + self.assertTrue(NOM_ETU.upper() in driver.page_source) # Test : creer une absence non justifiée # @expected : La fiche étudiante est incrémentée avec le nombre d'absence injustifiée correspondant def test_020_ajout_absence_non_justifiee(self): driver = self.driver global URL - driver.find_element_by_link_text("Ajouter").click() + driver.find_element_by_id("ajout_Absence").click() driver.find_element_by_name("datedebut").send_keys(dateDebutAbsenceNonJustifiee) driver.find_element_by_id("butsubmit").submit() time.sleep(1) @@ -87,14 +91,14 @@ class PythonOrgSearch(unittest.TestCase): # Test pour ajouter deux absences justifiées # @expected : La fiche d'information de l'étudiant concerné à son compteur d'absence augmenté de 2 - def test_ajout_absence_justifiee(self): + def test_021_ajout_absence_justifiee(self): driver = self.driver global URL - driver.find_element_by_link_text("Ajouter").click() + driver.find_element_by_id("ajout_Absence").click() driver.find_element_by_name("datedebut").send_keys(dateDebutAbsenceJustifiee) driver.find_element_by_name("estjust").click() driver.find_element_by_id("butsubmit").submit() - time.sleep(1) + self.wait.until(EC.url_changes(URL)) self.assertTrue("Ajout de 2 absences justifiées" in driver.page_source) driver = self.driver driver.find_element_by_link_text("Liste").click() @@ -107,13 +111,14 @@ class PythonOrgSearch(unittest.TestCase): # Test Justification d'une absence non justifiée # @expected : Le champs des absences non justifiées diminue et celui des justifiés augmente du nombre d'absence - def test_ajout_justification(self): + def test_022_ajout_justification(self): driver = self.driver global URL - driver.find_element_by_link_text("Justifier").click() + driver.find_element_by_id("justifier_Absence").click() driver.find_element_by_name("datedebut").send_keys(dateDebutAbsenceJustifiee) driver.find_element_by_name("description").send_keys("Un test selenium") driver.find_element_by_xpath("//input[@value='Envoyer']").click() + self.wait.until(EC.url_changes(URL)) self.assertTrue("Ajout de 2 justifications" in driver.page_source) driver = self.driver driver.find_element_by_link_text("Liste").click() @@ -128,19 +133,19 @@ class PythonOrgSearch(unittest.TestCase): # Test Suppression des absences pour un élève # @expected : Les compteurs d'absences sont remplacés par "Pas d'absences" - def test_supprimer_absence(self): + def test_024_supprimer_absence(self): driver = self.driver global URL - driver.find_element_by_link_text("Supprimer").click() + driver.find_element_by_id("supprimer_Absence").click() driver.find_element_by_name("datedebut").send_keys(dateDebutAbsenceJustifiee) driver.find_element_by_xpath("//input[@value='Supprimer les absences']").click() + self.wait.until(EC.url_changes(URL)) self.assertTrue("Annulation sur 2 demi-journées " in driver.page_source) - driver = self.driver - driver.find_element_by_link_text("Supprimer").click() + driver.find_element_by_id("supprimer_Absence ").click() driver.find_element_by_name("datedebut").send_keys(dateDebutAbsenceNonJustifiee) driver.find_element_by_xpath("//input[@value='Supprimer les absences']").click() - driver = self.driver - driver.find_element_by_link_text("Liste").click() + self.wait.until(EC.url_changes(URL)) + driver.find_element_by_id("afficher_Liste_Absence").click() self.assertTrue("Pas d'absences justifiées" in driver.page_source) self.assertTrue("Pas d'absences non justifiées" in driver.page_source) diff --git a/05_saisie_note_test.py b/05_saisie_note_test.py index c7021d1..2f008a5 100644 --- a/05_saisie_note_test.py +++ b/05_saisie_note_test.py @@ -1,5 +1,6 @@ import unittest import time +import subprocess import urllib.parse as urlparse from setting import ( SCODOC_ADMIN_ID, @@ -10,6 +11,9 @@ from setting import ( SCODOC_ENS_PASS, SCODOC_CHEF_ID, SCODOC_CHEF_PASS, + NAVIGATEUR, + LINK_SCODOC_SERVER, + BASE_NOT_SECURED_URL, ) from urllib.parse import parse_qs from selenium import webdriver @@ -19,17 +23,23 @@ from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import Select, WebDriverWait from selenium.webdriver.support.select import Select -urlMatiere = "" +URL_MATIERE = "" # Prérequis class PythonOrgSearch(unittest.TestCase): # Permet de se connecter et se remettre sur la page d'accueil avant chaque test + def setUp(self): - self.driver = webdriver.Firefox() + + if NAVIGATEUR == "firefox": + self.driver = webdriver.Firefox() + else: + self.driver = webdriver.Chrome() self.url = BASE_URL + NOM_DPT + "/Scolarite" self.wait = WebDriverWait(self.driver, 10) self.driver.get(BASE_URL) + self.driver.find_element_by_id("utilisateur_Vue").click() self.driver.find_element_by_id("name").send_keys(SCODOC_ENS_ID) self.driver.find_element_by_id("password").send_keys(SCODOC_ENS_PASS) self.driver.find_element_by_id("submit").click() @@ -256,4 +266,32 @@ class PythonOrgSearch(unittest.TestCase): if __name__ == "__main__": - unittest.main() \ No newline at end of file + if NAVIGATEUR == "firefox": + driver = webdriver.Firefox() + else: + driver = webdriver.Chrome() + cmdProcess = ["./scriptCreationDepartement.sh", LINK_SCODOC_SERVER, NOM_DPT] + process = subprocess.Popen(cmdProcess) + process.wait() + cmdProcess = [ + "./scriptExecution.sh", + LINK_SCODOC_SERVER, + NOM_DPT, + "test_scenario2_formation.py", + ] + process = subprocess.Popen(cmdProcess) + process.wait() + driver.get( + "https://" + + SCODOC_ADMIN_ID + + ":" + + SCODOC_ADMIN_PASS + + "@" + + BASE_NOT_SECURED_URL + + "force_admin_authentication" + ) + driver.find_element_by_id("utilisateur_Vue").click() + if(SCODOC_CHEF_ID not in driver.page_source): + + + unittest.main() diff --git a/__pycache__/setting.cpython-37.pyc b/__pycache__/setting.cpython-37.pyc index 3d55ae1ac3d688be77d852b9641ec51d2a9b44c4..9ff96bd99f61846960bca24820308cab131dca5f 100644 GIT binary patch delta 95 zcmbQmx|5aHiI) Channel error: cannot send/recv + +1622553799572 Marionette INFO Stopped listening on port 35521 +1622556399540 geckodriver INFO Listening on 127.0.0.1:32773 +1622556400543 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileCvfdF1" +1622556405474 Marionette INFO Listening on port 45127 +1622556405539 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622556424964 geckodriver INFO Listening on 127.0.0.1:33791 +1622556425968 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofilecS8RlS" +1622556431634 Marionette INFO Listening on port 35371 +1622556431652 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622556453106 geckodriver INFO Listening on 127.0.0.1:52951 +1622556454107 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofilejD4gAR" +1622556459875 Marionette INFO Listening on port 45051 +1622556459975 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622556479289 geckodriver INFO Listening on 127.0.0.1:37813 +1622556480292 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileoGQDXe" +1622556486059 Marionette INFO Listening on port 44753 +1622556486073 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622556516555 geckodriver INFO Listening on 127.0.0.1:59933 +1622556517562 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile8K8POC" +1622556522266 Marionette INFO Listening on port 34483 +1622556522293 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622556525433 geckodriver INFO Listening on 127.0.0.1:47925 +1622556526442 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofilea8hAja" +1622556531642 Marionette INFO Listening on port 40433 +1622556531724 Marionette WARN TLS certificate errors will be ignored for this session +1622556532728 geckodriver INFO Listening on 127.0.0.1:42759 +1622556533746 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileYQVD7J" +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +1622556812112 Marionette INFO Stopped listening on port 44753 +1622556812605 Marionette INFO Stopped listening on port 45051 +1622556813124 Marionette INFO Stopped listening on port 35371 +1622556814297 Marionette INFO Stopped listening on port 45127 +1622556886558 geckodriver INFO Listening on 127.0.0.1:56947 +1622556887560 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileJ3tiBY" +1622556891065 Marionette INFO Listening on port 43641 +1622556891085 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622556893588 geckodriver INFO Listening on 127.0.0.1:59045 +1622556894592 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofilekFNcfx" +1622556898122 Marionette INFO Listening on port 42433 +1622556898176 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622556899525 geckodriver INFO Listening on 127.0.0.1:45987 +1622556900509 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofilerVs0As" +1622556903963 Marionette INFO Listening on port 39909 +1622556904021 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622556905167 geckodriver INFO Listening on 127.0.0.1:36555 +1622556906156 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileVAAUZd" +1622556909967 Marionette INFO Listening on port 34629 +1622556910035 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622556911266 geckodriver INFO Listening on 127.0.0.1:42517 +1622556912276 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileYdZPjj" +1622556915318 Marionette INFO Stopped listening on port 34629 +1622556915681 Marionette INFO Stopped listening on port 39909 +JavaScript error: , line 0: uncaught exception: 2147500036 +JavaScript error: , line 0: uncaught exception: 2147500036 +JavaScript error: , line 0: uncaught exception: 2147500036 +JavaScript error: , line 0: uncaught exception: 2147500036 +JavaScript error: , line 0: uncaught exception: 2147500036 +JavaScript error: , line 0: uncaught exception: 2147500036 +console.warn: services.settings: main/cfr sync interrupted by shutdown +console.error: Region.jsm: "Failed to fetch region" (new TypeError("NetworkError when attempting to fetch resource.", "")) +1622556918311 geckodriver INFO Listening on 127.0.0.1:43841 +1622556919306 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile9186dX" +console.error: Region.jsm: "Failed to fetch region" (new TypeError("NetworkError when attempting to fetch resource.", "")) +1622556923816 Marionette INFO Stopped listening on port 42433 +1622556924641 geckodriver INFO Listening on 127.0.0.1:48575 +1622556925642 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofilehmZBhs" +1622556926468 Marionette INFO Stopped listening on port 43641 +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +1622556945021 geckodriver INFO Listening on 127.0.0.1:56157 +1622556946025 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileHwE4yE" +1622556949336 Marionette INFO Listening on port 38137 +1622556949430 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622556956613 geckodriver INFO Listening on 127.0.0.1:47651 +1622556957618 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofilepK8zdV" +1622556961457 Marionette INFO Listening on port 35127 +1622556961540 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: resource://devtools/client/jsonview/converter-observer.js, line 94: NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIChannel.contentType] +1622556962438 geckodriver INFO Listening on 127.0.0.1:42345 +1622556963439 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile7OBeDV" +1622556967236 Marionette INFO Stopped listening on port 35127 +1622556969407 Marionette INFO Listening on port 35815 +1622556969459 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622556970939 geckodriver INFO Listening on 127.0.0.1:43897 +1622556971939 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileJKk5zM" +1622556977995 Marionette INFO Listening on port 39629 +1622556978085 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622556979572 geckodriver INFO Listening on 127.0.0.1:50983 +1622556980576 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileeBXNO4" +1622556984948 Marionette INFO Listening on port 45355 +1622556984982 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622556986170 geckodriver INFO Listening on 127.0.0.1:35923 +1622556987170 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileQXicJ5" +1622556992472 Marionette INFO Listening on port 36157 +1622556992506 Marionette WARN TLS certificate errors will be ignored for this session +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +1622556998932 geckodriver INFO Listening on 127.0.0.1:38923 +1622556999936 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile5BI3Ii" +1622557004102 Marionette INFO Listening on port 45645 +1622557004144 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622557011448 geckodriver INFO Listening on 127.0.0.1:43489 +1622557012453 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofile8OcRac" +1622557016307 Marionette INFO Listening on port 38345 +1622557016341 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +1622557017693 geckodriver INFO Listening on 127.0.0.1:55509 +1622557018686 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofilenGBzRs" +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +[GFX1-]: Receive IPC close with reason=AbnormalShutdown +Exiting due to channel error. +1622557060019 geckodriver INFO Listening on 127.0.0.1:52835 +1622557061026 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileFeBD5E" +1622557064232 Marionette INFO Listening on port 37819 +1622557064245 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/test01/Scolarite/Users/create_user_form, line 1: ReferenceError: init_tf_form is not defined +1622557083788 Marionette INFO Stopped listening on port 37819 +1622557275525 geckodriver INFO Listening on 127.0.0.1:48979 +1622557276535 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileXeKc8e" +1622557280033 Marionette INFO Listening on port 35399 +1622557280108 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/test01/Scolarite/Users/create_user_form, line 1: ReferenceError: init_tf_form is not defined +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 6: TypeError: $(...).autocomplete is not a function +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/test01/Scolarite/Users/create_user_form, line 1: ReferenceError: init_tf_form is not defined +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/test01/Scolarite/Users/create_user_form, line 1: ReferenceError: init_tf_form is not defined +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/test01/Scolarite/Users/create_user_form, line 1: ReferenceError: init_tf_form is not defined +console.error: "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers." +1622557353412 geckodriver INFO Listening on 127.0.0.1:35135 +1622557354415 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileVbBeU0" +1622557357844 Marionette INFO Listening on port 43209 +1622557357895 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/test01/Scolarite/Users/create_user_form, line 1: ReferenceError: init_tf_form is not defined +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/test01/Scolarite/Users/create_user_form, line 1: ReferenceError: init_tf_form is not defined +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/libjs/jquery.field.min.js, line 12: ReferenceError: jQuery is not defined +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 4: ReferenceError: $ is not defined +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/test01/Scolarite/Users/create_user_form, line 207: ReferenceError: $ is not defined +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/test01/Scolarite/Users/create_user_form, line 1: ReferenceError: init_tf_form is not defined +console.error: "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers." +SourceActor threw an exception: Error: Failed to fetch https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/libjs/jquery.field.min.js. Code 2153398258. +Stack: onResponse@resource://devtools/shared/DevToolsUtils.js:547:16 +onStopRequest@resource://gre/modules/NetUtil.jsm:128:18 +Line: 547, column: 16 +console.error: (new Error("Failed to fetch https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/libjs/jquery.field.min.js. Code 2153398258.", "resource://devtools/shared/DevToolsUtils.js", 547)) +JavaScript error: resource://devtools/shared/DevToolsUtils.js, line 547: Error: Failed to fetch https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/libjs/jquery.field.min.js. Code 2153398258. +1622557427800 geckodriver INFO Listening on 127.0.0.1:49563 +1622557428804 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofilekMWVB1" +1622557431889 Marionette INFO Listening on port 42517 +1622557431980 Marionette WARN TLS certificate errors will be ignored for this session +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/test01/Scolarite/Users/create_user_form, line 1: ReferenceError: init_tf_form is not defined +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: security-state/cert-revocations importBulk() IndexedDB: importBulk() in security-state/cert-revocations The current transaction exceeded its quota limitations. +console.log: "RemoteSettingsWorker error: QuotaExceededError: IndexedDB: execute() The current transaction exceeded its quota limitations." +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: security-state/intermediates importBulk() IndexedDB: importBulk() in security-state/intermediates The current transaction exceeded its quota limitations. +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: blocklists/addons-bloomfilters importBulk() IndexedDB: importBulk() in blocklists/addons-bloomfilters The current transaction exceeded its quota limitations. +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: main/normandy-recipes-capabilities importBulk() IndexedDB: importBulk() in main/normandy-recipes-capabilities The current transaction exceeded its quota limitations. +console.log: "RemoteSettingsWorker error: QuotaExceededError: IndexedDB: execute() The current transaction exceeded its quota limitations." +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: security-state/onecrl importBulk() IndexedDB: importBulk() in security-state/onecrl The current transaction exceeded its quota limitations. +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: main/search-config importBulk() IndexedDB: importBulk() in main/search-config The current transaction exceeded its quota limitations. +console.log: "RemoteSettingsWorker error: QuotaExceededError: IndexedDB: execute() The current transaction exceeded its quota limitations." +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: main/url-classifier-skip-urls saveLastModified() IndexedDB: saveLastModified() in main/url-classifier-skip-urls The current transaction exceeded its quota limitations. +console.error: services.settings: + Message: InvalidStateError: IndexedDB: blocklists/gfx saveMetadata() IndexedDB: collections saveMetadata() in blocklists/gfx A mutation operation was attempted on a database that did not allow mutations. + Stack: + saveMetadata/<@resource://services-settings/Database.jsm:194:19 +executeIDB/promise<@resource://services-settings/IDBHelpers.jsm:134:16 +exe Message: InvalidStateError: IndexedDB: blocklists/gfx saveMetadata() IndexedDB: collections saveMetadata() in blocklists/gfx A mutation operation was attempted on a database that did not allow mutations. + Stack: + saveMetadata/<@resource://services-settings/Database.jsm:194:19 +executeIDB/promise<@resource://services-settings/IDBHelpers.jsm:134:16 +executeIDB@resource://services-settings/IDBHelpers.jsm:98:17 +executeIDB@resource://services-settings/Database.jsm:405:45 + +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: main/hijack-blocklists saveMetadata() IndexedDB: saveMetadata() in main/hijack-blocklists The current transaction exceeded its quota limitations. +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: main/tippytop importBulk() IndexedDB: importBulk() in main/tippytop The current transaction exceeded its quota limitations. +console.log: "RemoteSettingsWorker error: QuotaExceededError: IndexedDB: execute() The current transaction exceeded its quota limitations." +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: blocklists/plugins importBulk() IndexedDB: importBulk() in blocklists/plugins The current transaction exceeded its quota limitations. +console.log: "RemoteSettingsWorker error: QuotaExceededError: IndexedDB: execute() The current transaction exceeded its quota limitations." +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: main/search-default-override-allowlist importBulk() IndexedDB: importBulk() in main/search-default-override-allowlist The current transaction exceeded its quota limitations. +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: main/public-suffix-list saveMetadata() IndexedDB: saveMetadata() in main/public-suffix-list The current transaction exceeded its quota limitations. +console.log: "RemoteSettingsWorker error: QuotaExceededError: IndexedDB: execute() The current transaction exceeded its quota limitations." +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: main/language-dictionaries importBulk() IndexedDB: importBulk() in main/language-dictionaries The current transaction exceeded its quota limitations. +console.error: services.settings: + Message: InvalidStateError: IndexedDB: main/anti-tracking-url-decoration saveMetadata() IndexedDB: collections saveMetadata() in main/anti-tracking-url-decoration A mutation operation was attempted on a database that did not allow mutations. + Stack: + saveMetadata/<@resource://services-settings/Database.jsm:194:19 +executeIDB/promise<@resource://services-settings/IDBHelpers.jsm:134:16 +executeIDB@resource://services-settings/IDBHelpers.jsm:98:17 +executeIDB@resource://services-settings/Database.jsm:405:45 + +console.log: "RemoteSettingsWorker error: QuotaExceededError: IndexedDB: execute() The current transaction exceeded its quota limitations." +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: main/sites-classification importBulk() IndexedDB: importBulk() in main/sites-classification The current transaction exceeded its quota limitations. +console.log: "RemoteSettingsWorker error: QuotaExceededError: IndexedDB: execute() The current transaction exceeded its quota limitations." +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: pinning/pins saveLastModified() IndexedDB: saveLastModified() in pinning/pins The current transaction exceeded its quota limitations. +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: security-state/cert-revocations importBulk() IndexedDB: importBulk() in security-state/cert-revocations The current transaction exceeded its quota limitations. +console.log: "RemoteSettingsWorker error: QuotaExceededError: IndexedDB: execute() The current transaction exceeded its quota limitations." +console.error: services.settings: + Message: QuotaExceededError: IndexedDB: security-state/intermediates importBulk() IndexedDB: importBulk() in security-state/intermediates The current transaction excee1622557912390 Marionette INFO Stopped listening on port 42517 +console.error: "Could not write session state file " (new Error("", "(unknown module)")) "" +JavaScript error: , line 0: uncaught exception: Object +JavaScript error: , line 0: uncaught exception: Object +JavaScript error: , line 0: QuotaExceededError: The current transaction exceeded its quota limitations. +JavaScript error: , line 0: uncaught exception: Object +JavaScript error: , line 0: uncaught exception: Object +JavaScript error: resource://gre/modules/AsyncShutdown.jsm, line 554: uncaught exception: Object +JavaScript error: resource://gre/modules/AsyncShutdown.jsm, line 554: uncaught exception: Object +1622557912877 Marionette INFO Stopped listening on port 43209 +console.error: "Could not write session state file " (new Error("", "(unknown module)")) "" +JavaScript error: , line 0: uncaught exception: Object +JavaScript error: , line 0: uncaught exception: Object +JavaScript error: , line 0: uncaught exception: Object +JavaScript error: , line 0: QuotaExceededError: The current transaction exceeded its quota limitations. +JavaScript error: , line 0: uncaught exception: Object +JavaScript error: , line 0: uncaught exception: Object +JavaScript error: resource://gre/modules/AsyncShutdown.jsm, line 554: uncaught exception: Object +JavaScript error: resource://gre/modules/AsyncShutdown.jsm, line 554: uncaught exception: Object +1622557913525 Marionette INFO Stopped listening on port 35399 +1622558042501 geckodriver INFO Listening on 127.0.0.1:37091 +1622558043504 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofileaCqUos" +JavaScript error: undefined, line 0: Error: An unexpected error occurred +JavaScript error: , line 0: uncaught exception: Object +JavaScript error: resource://gre/modules/PlacesUtils.jsm, line 1963: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsINavBookmarksService.tagsFolder] +console.error: PushService: + stateChangeProcessEnqueue: Error transitioning state + QuotaExceededError +JavaScript error: , line 0: QuotaExceededError: The current transaction exceeded its quota limitations. +console.log: "RemoteSettingsWorker error: QuotaExceededError: IndexedDB: execute() The current transaction exceeded its quota limitations." +1622558047179 Marionette INFO Listening on port 36895 +1622558047268 Marionette WARN TLS certificate errors will be ignored for this session +console.log: "RemoteSettingsWorker error: QuotaExceededError: IndexedDB: execute() The current transaction exceeded its quota limitations." +JavaScript error: resource://gre/modules/PlacesUtils.jsm, line 1963: NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsINavBookmarksService.tagsFolder] +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/static/js/scodoc.js, line 97: TypeError: $(...).DataTable is not a function +JavaScript error: resource://gre/modules/NewTabUtils.jsm, line 1441: TypeError: conn is undefined +JavaScript error: resource://gre/modules/NewTabUtils.jsm, line 1441: TypeError: conn is undefined +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/test01/Scolarite/Users/create_user_form, line 1: ReferenceError: init_tf_form is not defined +console.error: (new Error("Error(s) encountered during statement execution: database or disk is full", "resource://gre/modules/Sqlite.jsm", 887)) +JavaScript error: resource://gre/modules/Sqlite.jsm, line 887: Error: Error(s) encountered during statement execution: database or disk is full +JavaScript error: resource://gre/modules/Sqlite.jsm, line 887: Error: Error(s) encountered during statement execution: database or disk is full +JavaScript error: resource://gre/modules/Sqlite.jsm, line 887: Error: Error(s) encountered during statement execution: database or disk is full +JavaScript error: resource://gre/modules/NewTabUtils.jsm, line 1441: TypeError: conn is undefined +JavaScript error: https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/test01/Scolarite/Users/create_user_for1622558105664 Marionette INFO Stopped listening on port 36895 diff --git a/readme.md b/readme.md index e69de29..891af63 100644 --- a/readme.md +++ b/readme.md @@ -0,0 +1,9 @@ +I Configuaration + +Environnement de test : +Editer le .envmodel pour remplacer les différentes informations qui permettent d'intéragir avec Scodoc (attention au / dans les liens, il y a des exemples) +Renommer le fichier en .env + +Les tests sont prévus pour fonctionner avec firefox, le webdriver (geckodriver) est intégré dans le projet pour éviter de devoir l'installer manuellement + +Les tests sont prévus pour fonctionner en python 3 avec unit test \ No newline at end of file diff --git a/setting.py b/setting.py index 87df3b3..36eace0 100644 --- a/setting.py +++ b/setting.py @@ -14,4 +14,5 @@ SCODOC_ENS_PASS = os.environ.get("SCODOC_ENS_PASS") SCODOC_CHEF_ID = os.environ.get("SCODOC_CHEF_ID") SCODOC_CHEF_PASS = os.environ.get("SCODOC_CHEF_PASS") LINK_SCODOC_SERVER = os.environ.get("LINK_SCODOC_SERVER") -BASE_NOT_SECURED_URL = os.environ.get("BASE_NOT_SECURED_URL") \ No newline at end of file +BASE_NOT_SECURED_URL = os.environ.get("BASE_NOT_SECURED_URL") +NAVIGATEUR = os.environ.get("NAVIGATEUR") \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 98c99a0..0000000 --- a/setup.py +++ /dev/null @@ -1,10 +0,0 @@ -BASE_URL = "https://scodoc-dev-iutinfo.univ-lille.fr/ScoDoc/" -NOM_DPT = "test01" -SCODOC_ADMIN_ID = "admin" -SCODOC_ADMIN_PASS = "root_pass_42" -SCODOC_ENS_ID = "enseignantUS" -SCODOC_ENS_PASS = "enseignant@" -SCODOC_CHEF_ID = "chefdesetudesUS" -SCODOC_CHEF_PASS = "passwordUS42" -LINK_SCODOC_SERVER = "root@scodoc-dev-iutinfo.univ-lille.fr" -BASE_NOT_SECURED_URL = "scodoc-dev-iutinfo.univ-lille.fr/" \ No newline at end of file