Skip to content

Latest commit

 

History

History
65 lines (54 loc) · 3.46 KB

README.md

File metadata and controls

65 lines (54 loc) · 3.46 KB

SQL Tutorial

This repo contains the materials needed for my "SQL" tutorial

Setup

  • (Required) Install docker Docker Desktop if you don't have it in your system
  • (Optional) Install MySQL Workbench desktop app to interact with the MySQL (Server) DMS
  • We use docker compose to install and run an RDMS instance of the MySQL (Server)
    • Run the following command to install and run an instance of MySQL(Server), and MySQL workbench web portal :
      docker compose -f ./mysql.yml up -d  --wait --wait-timeout 30
    • Run the following command to stop them:
      docker compose -f ./mysql.yml down
    • Run the following command if you want to remove them and start all over again:
      docker compose -f ./mysql.yml rm -v

⚠️ Note that this will open the following:

  • MySQL(Server) on port 3306
  • MySQL workbench web portal on port 3000
  • To connect to the MySQL(Server) instance

    • Some of the clients that you can use to do so are:

    • Use the following properties to connect:

      Property Value (Workbench Web portal) Value (Workbench desktop or Vscode extension)
      Hostname mysql-db localhost or 127.0.0.1
      Port 3306 3306
      Username root root
      Password 123456 123456

Run Automated Tests

To run the automted tests scripts you need to do the following after the setup

  • You need to have nodejs installed in your machine

    ⚠️ Note that its better to use a node version manager like nvm or nvm-windows for windows to install nodejs

  • Open a new terminal and change your current directory to auto/basic-style:
    cd ./auto/basic-style/
  • Install all the needed packages with npm:
    npm install
  • Run the test by the follwing command:
    npm run test
  • You can check the testing and covarage reports throgh the terminal or from the auto genrated html files inside the ./sql-tut/auto/basic-style/reports folder

🤓 Credits & Resources