mongulu-cm / manzi-mfa

Le pont vers l'emploi dans l' IT grâce un échange d'1h avec un senior
https://manzi-mfa.mongulu.cm
GNU General Public License v3.0
2 stars 0 forks source link

Add observability for mysql,easyapointments logs #8

Closed billmetangmo closed 9 months ago

billmetangmo commented 11 months ago

logs for mysql,easyappoitments + alerts if 500 in easyappointments

billmetangmo commented 10 months ago

Pas nécessaire ça, il faut d'abord vérifier le chemin critique. Je pense que l'observabilité c'est plus pour détecter des soucis en avance de phase et ajuster mais ça ne doit pas être lui qui te dit qu'il y a un pb sur ton app.

billmetangmo commented 10 months ago

Python3 selenium to test critical path ( Chrome Kasm)

# Generated by Selenium IDE
import pytest
import time
import json
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

class TestAppointmenttest():
  def setup_method(self, method):
    self.driver = webdriver.Chrome()
    self.vars = {}

  def teardown_method(self, method):
    self.driver.quit()

  def test_appointmenttest(self):
    # Test name: appointment_test
    # Step # | name | target | value
    # 1 | open | / | 
    self.driver.get("https://manzi-mfa.mongulu.cm/")
    # 2 | setWindowSize | 1680x865 | 
    self.driver.set_window_size(1680, 865)
    # 3 | select | id=select-service | label=DevOps/SRE
    dropdown = self.driver.find_element(By.ID, "select-service")
    dropdown.find_element(By.XPATH, "//option[. = 'DevOps/SRE']").click()
    # 4 | mouseDownAt | id=select-service | 0,-0.5
    element = self.driver.find_element(By.ID, "select-service")
    actions = ActionChains(self.driver)
    actions.move_to_element(element).click_and_hold().perform()
    # 5 | mouseMoveAt | id=select-service | 0,-0.5
    element = self.driver.find_element(By.ID, "select-service")
    actions = ActionChains(self.driver)
    actions.move_to_element(element).perform()
    # 6 | mouseUpAt | id=select-service | 0,-0.5
    element = self.driver.find_element(By.ID, "select-service")
    actions = ActionChains(self.driver)
    actions.move_to_element(element).release().perform()
    # 7 | select | id=select-provider | label=Bill METANGMO
    dropdown = self.driver.find_element(By.ID, "select-provider")
    dropdown.find_element(By.XPATH, "//option[. = 'Bill METANGMO']").click()
    # 8 | mouseDownAt | id=select-provider | 0,-0.1875
    element = self.driver.find_element(By.ID, "select-provider")
    actions = ActionChains(self.driver)
    actions.move_to_element(element).click_and_hold().perform()
    # 9 | mouseMoveAt | id=select-provider | 0,-0.1875
    element = self.driver.find_element(By.ID, "select-provider")
    actions = ActionChains(self.driver)
    actions.move_to_element(element).perform()
    # 10 | mouseUpAt | id=select-provider | 0,-0.1875
    element = self.driver.find_element(By.ID, "select-provider")
    actions = ActionChains(self.driver)
    actions.move_to_element(element).release().perform()
    # 11 | click | id=button-next-1 | 
    self.driver.find_element(By.ID, "button-next-1").click()
    # 12 | mouseDownAt | id=select-timezone | 112.5,31
    element = self.driver.find_element(By.ID, "select-timezone")
    actions = ActionChains(self.driver)
    actions.move_to_element(element).click_and_hold().perform()
    # 13 | mouseMoveAt | id=select-timezone | 112.5,31
    element = self.driver.find_element(By.ID, "select-timezone")
    actions = ActionChains(self.driver)
    actions.move_to_element(element).perform()
    # 14 | mouseUpAt | id=select-timezone | 112.5,31
    element = self.driver.find_element(By.ID, "select-timezone")
    actions = ActionChains(self.driver)
    actions.move_to_element(element).release().perform()
    # 15 | click | id=select-timezone | 
    self.driver.find_element(By.ID, "select-timezone").click()
    # 16 | select | id=select-timezone | label=Paris (+1:00)
    dropdown = self.driver.find_element(By.ID, "select-timezone")
    dropdown.find_element(By.XPATH, "//option[. = 'Paris (+1:00)']").click()
    # 17 | mouseDownAt | id=select-timezone | -0.5,0
    element = self.driver.find_element(By.ID, "select-timezone")
    actions = ActionChains(self.driver)
    actions.move_to_element(element).click_and_hold().perform()
    # 18 | mouseMoveAt | id=select-timezone | -0.5,0
    element = self.driver.find_element(By.ID, "select-timezone")
    actions = ActionChains(self.driver)
    actions.move_to_element(element).perform()
    # 19 | mouseUpAt | id=select-timezone | -0.5,0
    element = self.driver.find_element(By.ID, "select-timezone")
    actions = ActionChains(self.driver)
    actions.move_to_element(element).release().perform()
    # 20 | click | id=button-next-2 | 
    self.driver.find_element(By.ID, "button-next-2").click()
    # 21 | click | id=first-name | 
    self.driver.find_element(By.ID, "first-name").click()
    # 22 | type | id=first-name | Test
    self.driver.find_element(By.ID, "first-name").send_keys("Test")
    # 23 | click | id=last-name | 
    self.driver.find_element(By.ID, "last-name").click()
    # 24 | type | id=last-name | Test
    self.driver.find_element(By.ID, "last-name").send_keys("Test")
    # 25 | click | id=city | 
    self.driver.find_element(By.ID, "city").click()
    # 26 | type | id=city | Test
    self.driver.find_element(By.ID, "city").send_keys("Test")
    # 27 | click | id=email | 
    self.driver.find_element(By.ID, "email").click()
    # 28 | type | id=email | ntomzebiglas-it@yahoo.com
    self.driver.find_element(By.ID, "email").send_keys("ntomzebiglas-it@yahoo.com")
    # 29 | click | id=phone-number | 
    self.driver.find_element(By.ID, "phone-number").click()
    # 30 | type | id=phone-number | 0033666752512
    self.driver.find_element(By.ID, "phone-number").send_keys("0033666752512")
    # 31 | click | id=button-next-3 | 
    self.driver.find_element(By.ID, "button-next-3").click()
    # 32 | click | id=book-appointment-submit | 
    self.driver.find_element(By.ID, "book-appointment-submit").click()
    # 33 | click | css=.row | 
    self.driver.find_element(By.CSS_SELECTOR, ".row").click()