Demo of automated testing use cases for the 2022 nationals

Overview

Tests automatisés aux finales nationales 2022

Test d'API (Module C2)

Pour le module C2, les spécifications de l'API seront fournies dans la spécification OpenAPI.

Les tests utilisent PHPUnit et vont procéder de la sorte :

  • Ils nettoient la base de données, et la remplissent avec des données de test (le fichier SQL fourni dès le début du module). Il ne faut donc pas toucher à la structure de la BDD.

  • Ils appellent, dans un ordre bien précis, les différentes routes de l'API, dans le but de tester aussi les effets de bord (par exemple, tester par une requête GET que l'élément créé juste avant avec la requête POST est présent et bien formé).

  • Pour chacune des routes, plusieurs tests sont lancés :

    • Le fonctionnement avec des données correctes
    • Le fonctionnement avec des données incorrectes (pour tester la validation)
    • Les codes HTTP de retour
    • Les headers de retour
    • Le format de la réponse : tous les champs sont présents, le tri est fait par date, ...
    • ...

    Chacun de ces tests est indépendant.

  • Ces tests vous seront fournis pendant le module, sans le nombre de points associés.

  • Les jurés auront les mêmes tests, avec d'autres données, ceci afin de s'assurer que rien n'est renvoyé en dur.

Ces tests peuvent être lancés depuis un répertoire externe, car on teste l'API en elle-même et pas le code.

Tests unitaires - Jest et PHPUnit (Speed-Module)

Ces tests sont directement intégrés au répertoire du code, car ils testent directement des fonctions. Dans le cadre du speed-module, ils vont être lancés à intervalles réguliers par un programme externe qui fera le lien avec le tableau des scores :

De la même manière, une version est présente dans le répertoire, et une version étendue est présente sur l'outil et pour les jurés, pour exclure les retours en dur dans le code. Ces deux versions incluent les fonctions présentes de base dans le fichier, d'où l'importance de ne pas changer leur nom !

Tests par navigateur headless (utilisant Cypress)

Ces tests permettront d'évaluer des tâches HTML/CSS du speed-module, notamment par le biais de fonctions du type cy.get(mainMenu).should('have.css', 'height', '500px') voire de la comparaison de screenshots. TODO: mettre des exemples dans ce repo

You might also like...
Open Source Voucher Management System is a web application for manage voucher. used PHP with Laravel Framework and use MySQL for Database.
Open Source Voucher Management System is a web application for manage voucher. used PHP with Laravel Framework and use MySQL for Database.

Voucher Management System is a web application for manage voucher. You can create and manage your voucher. Voucher Management System is used PHP with Laravel Framework and use MySQL for Database.

Personal Knowledge Management. Use branch "minimal change" to deploy as laravel package.

Knowfox Knowfox is my Personal Knowledge Management system. Having been an keen Evernote user since 2012, I finally got around to taking my precious n

simple laravel zoho library no db required it use cache to store token

zoholib laravel simple zoho library installation composer create-project yls/zoholib Library to use part of https://desk.zoho.com/DeskAPIDocument list

This is a visitor management system, developed by the use of Laravel 8 combined with Jetstream, Livewire and Tailwind CSS.

This is a visitor management system, developed by the use of Laravel 8 combined with Jetstream, Livewire and Tailwind CSS.

Instagram automation represents the use of third-party software to manage your account, carry out tasks and/or interact with users without a human present.  Bulit in Laravel Framework
Instagram automation represents the use of third-party software to manage your account, carry out tasks and/or interact with users without a human present. Bulit in Laravel Framework

How to Deploy laravel project to heroku Video Link : https://youtu.be/7Nq_a2QiaHo Home Page Login Page Dashboard Page About Laravel Laravel is a web a

This application gives you the ability to send a newsletter to multiple subscribers with use of SMTP or an external driver like Mailgun
This application gives you the ability to send a newsletter to multiple subscribers with use of SMTP or an external driver like Mailgun

Laravel Newsletter Laravel Newsletter is an open source project that can be used for sending newsletters to multiple subscribers, mailing lists, ... a

DBase - An easy-to-use backend for mobile and web applications
DBase - An easy-to-use backend for mobile and web applications

DBase DBase is an easy-to-use backend for your mobile and web applications, host the files in an Ubuntu server and use the SDKs to perform CRUD operat

A flexible, elegant, fast and easy-to-use content management system written in PHP
A flexible, elegant, fast and easy-to-use content management system written in PHP

Textpattern CMS A flexible, elegant, fast and easy-to-use content management system written in PHP. Textpattern is free and open source software.

PHP web based Password Manager for business and personal use.

sysPass - Systems Password Manager Join us in the Gitter chat room: PHP web based Password Manager for business and personal use. AES-256 encryption i

Owner
Worldskills France - Web Technologies
Skill #17 - Web Technologies assets for french WorldSkills team.
Worldskills France - Web Technologies
Satu platform demo ringkas untuk rujukan Basic PHP

praktisphpmysql Satu platform demo ringkas untuk rujukan Basic PHP Demo https://legoom.biz.my/praktisphpmysql/ Belajar Koding Kemasukan Mei dan Septem

RB 11 Jun 21, 2022
Demo for "Migrating into Layout Builder" from DrupalCon in 2021.

Migrating Into Layout Builder Demo For DrupalCon in 2021, I presented on Migrating Into Layout Builder. For this presentation, I came up with this sim

Chris Wells 10 Nov 3, 2022
A demo of deploying mediawiki to kubernetes

emwcon-demo Files needed for a demo of deploying mediawiki to kubernetes Prerequisites docker a kubernetes cluster a copy of mediawiki/core moved into

J H 7 Jun 22, 2022
Demo of using geo data in PHP web applications

phpgeo-demo Demo of using geo data in PHP web applications Goals Demonstrate basic data storage and retrieval methods using Geo specific data Orient t

J Corry 2 Jul 10, 2016
Twitter like application made with Laravel in 10 hours. Demo at

Critter, A Twitter like application written with Laravel in under 10 hours by @msurguy Imagine Twitter is down again. It's dark outside, and how can y

Maksim Surguy 58 Nov 30, 2022
The completed blog demo project from Laravel 8 From Scratch.

Laravel From Scratch Blog Demo Project http://laravelfromscratch.com Installation First clone this repository, install the dependencies, and setup you

Jeffrey Way 379 Jan 5, 2023
Elastic Beanstalk Multi Container PHP-FPM + Nginx Demo App

Elastic Beanstalk Multi Container PHP-FPM + Nginx Demo App This demo app shows you how to run a simple PHP application using the PHP-FPM and Nginx Doc

AWS Samples 141 Sep 18, 2022
A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.

Lychee A great looking and easy-to-use photo-management-system. Since the 1st of April 2018 this project has moved to it's own Organisation (https://g

Tobias Reich 6.2k Jan 5, 2023
NamelessMC is a free, easy to use & powerful website software for your Minecraft server

NamelessMC - v2 pre-release 10 NamelessMC is a free, easy to use & powerful website software for your Minecraft server, which includes a large range o

NamelessMC 520 Jan 1, 2023
Powerful, yet easy to use, open-source online ordering, table reservation and management system for restaurants

TastyIgniter provides a professional and reliable platform for restaurants wanting to offer online food ordering and table reservation to their custom

TastyIgniter 2.4k Dec 27, 2022