Compare commits
No commits in common. "23def285c5e15bc79fab54dad483e137a9a6238d" and "9c00e853695f54e14451ec18296f4cc19b67a634" have entirely different histories.
23def285c5
...
9c00e85369
@ -74,7 +74,7 @@ class PythonOrgSearch(unittest.TestCase):
|
||||
driver = self.driver
|
||||
global URL
|
||||
driver.get(URL)
|
||||
idEditFormation = "edit-formation-" + ACRONYME_FORMATION.replace(" ","-")
|
||||
idEditFormation = "edit-formation-" + ACRONYME_FORMATION
|
||||
driver.find_element_by_id(idEditFormation).click()
|
||||
self.wait.until(EC.url_changes(URL))
|
||||
driver.find_element_by_id("tf_acronyme").send_keys(ACRONYME_FORMATION)
|
||||
@ -108,10 +108,9 @@ class PythonOrgSearch(unittest.TestCase):
|
||||
driver.find_element_by_id("tf_submit").click()
|
||||
try:
|
||||
driver.find_element_by_class_name("error-message")
|
||||
message_erreur_present = True
|
||||
except NoSuchElementException:
|
||||
message_erreur_present = False
|
||||
self.assertTrue(message_erreur_present)
|
||||
self.assertFalse(True)
|
||||
self.assertTrue(True)
|
||||
|
||||
# Test : Ajout d'une UE dans la formation
|
||||
# @Expected : L'UE est créée et elle apparait désormais dans la liste d'UE de la formation
|
||||
@ -119,7 +118,7 @@ class PythonOrgSearch(unittest.TestCase):
|
||||
driver = self.driver
|
||||
global URL
|
||||
driver.get(URL)
|
||||
idTitre = "titre-" + ACRONYME_FORMATION.replace(" ", "-")
|
||||
idTitre = "titre-" + ACRONYME_FORMATION
|
||||
driver.find_element_by_id(idTitre).click()
|
||||
self.wait.until(EC.url_changes(URL))
|
||||
driver.find_element_by_xpath("//a[contains(@href,'ue_create?')]").click()
|
||||
@ -167,7 +166,7 @@ class PythonOrgSearch(unittest.TestCase):
|
||||
driver = self.driver
|
||||
global URL
|
||||
driver.get(URL)
|
||||
idAddSemestre = "add-semestre-" + ACRONYME_FORMATION.replace(" ", "-")
|
||||
idAddSemestre = "add-semestre-" + ACRONYME_FORMATION
|
||||
driver.find_element_by_id(idAddSemestre).click()
|
||||
self.wait.until(EC.url_changes(URL))
|
||||
driver.find_element_by_name("date_debut").send_keys("01/01/2021")
|
||||
|
@ -108,7 +108,7 @@ class PythonOrgSearch(unittest.TestCase):
|
||||
driver.find_element_by_id("tf_submit").click()
|
||||
time.sleep(1)
|
||||
self.assertTrue(
|
||||
codepostaldomicile in driver.find_element_by_id("student-address").text
|
||||
codepostaldomicile in driver.find_element_by_id("student-adress").text
|
||||
)
|
||||
|
||||
# Test Inscription d'un étudiant dans un semestre
|
||||
@ -173,10 +173,10 @@ class PythonOrgSearch(unittest.TestCase):
|
||||
element.submit()
|
||||
time.sleep(1)
|
||||
try:
|
||||
element = driver.find_element_by_id("title-no-result")
|
||||
element = driver.find_element_by_id("titleNoResult")
|
||||
self.assertTrue("Aucun résultat" in element.text)
|
||||
except:
|
||||
self.assertFalse(True)
|
||||
self.assertFalse(False)
|
||||
|
||||
# ferme la fenetre
|
||||
def tearDown(self):
|
||||
|
@ -89,18 +89,14 @@ class PythonOrgSearch(unittest.TestCase):
|
||||
driver.get(URL)
|
||||
driver.find_element_by_link_text("semestre 4").click()
|
||||
self.wait.until(EC.url_changes(URL))
|
||||
matiereExist = False
|
||||
try:
|
||||
driver.find_element_by_class_name("formsemestre_status_ue")
|
||||
global URL_SEMESTRE
|
||||
URL_SEMESTRE = driver.current_url
|
||||
matiereExist = True
|
||||
self.assertTrue(True)
|
||||
except NoSuchElementException:
|
||||
matiereExist = False
|
||||
self.assertTrue(matiereExist)
|
||||
self.assertFalse(False)
|
||||
|
||||
#Test : Changement de responsable sur module
|
||||
# @expected : Le nom du responsable choisi apparait désormais sur le module concerné
|
||||
def test_030_changement_responsable_sur_module(self):
|
||||
driver = self.driver
|
||||
isThere = False
|
||||
@ -127,7 +123,7 @@ class PythonOrgSearch(unittest.TestCase):
|
||||
driver.find_element_by_id("tf_submit").click()
|
||||
time.sleep(1)
|
||||
driver.get(URL_MATIERE)
|
||||
nomResponsable = driver.find_element_by_id("ens-responsable")
|
||||
nomResponsable = driver.find_element_by_id("ens_Responsable")
|
||||
self.assertTrue(SCODOC_CHEF_ID.lower() in nomResponsable.text.lower())
|
||||
global isAdmin
|
||||
isAdmin = False
|
||||
@ -150,7 +146,7 @@ class PythonOrgSearch(unittest.TestCase):
|
||||
driver.find_element_by_id("tf_submit").click()
|
||||
time.sleep(1)
|
||||
driver.get(URL_MATIERE)
|
||||
professeurDansModule = driver.find_elements_by_class_name("ens-in-module")
|
||||
professeurDansModule = driver.find_elements_by_class_name("ens_Dans_Module")
|
||||
time.sleep(5)
|
||||
professeurString = []
|
||||
for professeur in professeurDansModule:
|
||||
|
@ -93,7 +93,7 @@ class PythonOrgSearch(unittest.TestCase):
|
||||
searchBar.send_keys(etudiant)
|
||||
searchBar.submit()
|
||||
time.sleep(5)
|
||||
MOY_UE1 = driver.find_element_by_id("ue-" + ue_name.lower().replace(" ","-")).text
|
||||
MOY_UE1 = driver.find_element_by_id("ue-" + ue_name).text
|
||||
if "12" not in MOY_UE1:
|
||||
noteBonne = False
|
||||
self.assertTrue(noteBonne)
|
||||
@ -129,7 +129,7 @@ class PythonOrgSearch(unittest.TestCase):
|
||||
searchBar.send_keys(etudiant)
|
||||
searchBar.submit()
|
||||
time.sleep(5)
|
||||
MOY_UE2 = driver.find_element_by_id("ue-" + ue_name.lower().replace(" ","-")).text
|
||||
MOY_UE2 = driver.find_element_by_id("ue-" + ue_name).text
|
||||
if "8" not in MOY_UE2:
|
||||
noteBonne = False
|
||||
|
||||
@ -167,7 +167,7 @@ class PythonOrgSearch(unittest.TestCase):
|
||||
url = self.url
|
||||
driver.get(url)
|
||||
driver.find_element_by_id("link-programmes").click()
|
||||
driver.find_element_by_id("titre-dut-info").click()
|
||||
driver.find_element_by_id("titre-DUT Info").click()
|
||||
driver.find_element_by_xpath("//span[contains(text(),'M1101')]").click()
|
||||
driver.find_element_by_id("tf_coefficient").clear()
|
||||
driver.find_element_by_id("tf_coefficient").send_keys(COEFF_UE1)
|
||||
@ -350,11 +350,11 @@ class PythonOrgSearch(unittest.TestCase):
|
||||
moyenneBonne = False
|
||||
if ue_name not in ueListText:
|
||||
affichageMoyenne = False
|
||||
MOY_UE1 = driver.find_element_by_id("ue-" + ue_name.lower().replace(" ","-")).text
|
||||
MOY_UE1 = driver.find_element_by_id("ue-" + ue_name).text
|
||||
if float(0) != float(MOY_UE1):
|
||||
noteExcuseeEgaleAZero = False
|
||||
elif numeroEtu == 1:
|
||||
MOY_UE1 = driver.find_element_by_id("ue-" + ue_name.lower().replace(" ","-")).text
|
||||
MOY_UE1 = driver.find_element_by_id("ue-" + ue_name).text
|
||||
moyEtudiant2 = (
|
||||
float(MOY_UE1) * COEFF_UE1
|
||||
+ (float(MOY_UE2) - float(moyenneBonusEtudiant2)) * COEFF_UE2
|
||||
|
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#Ce script lance en séquence les différents jeux de tests.
|
||||
if [ "$#" -eq 1 ]
|
||||
if [ "$#" -ne 2 ]
|
||||
then
|
||||
if [ "$1" = "--cleanup" ] || [ "$1" = "--c" ]
|
||||
then
|
||||
|
13
readme.md
13
readme.md
@ -78,16 +78,7 @@ Alternativement vous pouvez lancer l'ensemble des tests avec la commande
|
||||
|
||||
>./lancement_de_tout_les_tests.sh
|
||||
|
||||
L'option --c ou --cleanup est disponible si vous souhaitez effacer tout les rapports précédents
|
||||
|
||||
###Resultats des tests
|
||||
|
||||
Les tests sont présentés sur une page HTML qui se trouve dans le dossier ResultatTest, il y a une page HTML par jeux de tests créée. Un récapitulatif est également créé par le biais du script
|
||||
|
||||
>./scriptGenerateReportPage.sh
|
||||
|
||||
Celui ci est lancé automatiquement à la fin du script
|
||||
|
||||
>./lancement_de_tout_les_tests.sh
|
||||
|
||||
Vous y retrouverez les liens menant au détails de chaque rapport ainsi qu'un résumé du nombre de test passés/échoués
|
||||
###TODO
|
||||
> Lancer les test en parrallèle
|
@ -35,9 +35,7 @@ echo '<!DOCTYPE html>
|
||||
for file in ./ResultatTest/*.html; do
|
||||
RESULT=$(cat $file | grep "Summary")
|
||||
BASEFILE=$(basename $file)
|
||||
LINK="$BASEFILE"
|
||||
if [[ $LINK != *"Résumé"* ]] ; then
|
||||
echo "├── <a href=${LINK}>${BASEFILE}</a>${RESULT}<br>" >> ./ResultatTest/Résumé_${TIME}.html
|
||||
fi
|
||||
LINK="${BASEFILE}"
|
||||
echo "├── <a href=${LINK}>${BASEFILE}</a>'${RESULT}'<br>" >> ./ResultatTest/Résumé_${TIME}.html
|
||||
done
|
||||
echo '<br><br><br><br></body></html>' >> ./ResultatTest/Résumé_"${TIME}".html
|
Loading…
Reference in New Issue
Block a user