Coder Social home page Coder Social logo

software_testing_and_devops's Introduction

Software Testing and Devops

App Description

  • Web application in which we can add notes.
  • User must be logged in in order to use application.
  • Tools : Flask - Sqlite3

image

image

Software Testing

  1. Unit Testing
  2. Integration Testing
  3. E2E Testing
  4. User Acceptance Testing

Unit Testing

  • In unit test I tested 8 functions,6 functions in NotesRepo (testShowAllNotes, testNumberOfNotes, testShowNoteById, TestAddNote, TestUpdateNote, TestDelete) and 2 functions in AuthRepo(testSignIn, testSignUp).

  • There are 3 phases to each test:

    • Given
    • When
    • Then
  • To run unit tests we can use the command :

coverage run -m unittest Tests/UnitTests/test_units.py

image

  • To see the result of unit tests coverage we can use the commande :
 coverage report

image

Integration Testing

  • In Integration test I tested 8 functions (test_register, test_login_page, test_signin_fail, test_signin_success, test_logout, test_notes, test_create_note_page, test_Note_add)

  • There are 3 phases to each test: - Given - When - Then

  • Tests are performed by testing the status code of the response as well as checking if the expected result is included in the response page.

  • To run integration tests along with unit tests we can use the command :

coverage run -m pytest

image

  • To see the result of integration tests along with unit tests coverage we can use the commande :
 coverage report

image

E2E testing

  • In E2E tests I tested 3 functions (test_01_register, test_02_signin, test_03_add_Note).
  • I used Selenium for this test.
  • The navigations by the selenium are saved as screenshots. These screen shots are saved in the file Screenshots.
  • To run e2e tests we can use the command :
coverage run -m unittest Tests/E2E/test_e2e.py

image

User Acceptance Testing (UAT)

  • It is divided into 8 sections:
    • UAT Scope
    • UAT Assumptions and Constraints
    • UAT Risks
    • UAT Team Roles & Responsibilities
    • UAT Entry Criteria
    • UAT Requirements-Based Test Cases
    • UAT Test Results
    • Document Signatures

Devops CI/CD Pipeline

What is CI CD?

  • CI/CD is a method to frequently deliver apps to customers by introducing automation into the stages of app development. The main concepts attributed to CI/CD are continuous integration, continuous delivery, and continuous deployment.

CI

  • The workflow had 2 jobs the first one is a Test Job and the second is a Build job.
  • In the test job we test the app with integration tests, unit tests and e2e tests.
  • In the build job we build a docker image and pushed it to docker hub

image

CD

  • I added to the workflow another job : Deploy job
  • For the deployment i used ECS.
  • I created a cluster then a task definition then a service.
  • The service has 3 tasks.

image

  • You can access to MyNote app by typing this in the browser link mynote-app-lb-548946768.eu-west-2.elb.amazonaws.com:5000.

image

image

software_testing_and_devops's People

Contributors

aymenboujmil avatar

Stargazers

Mekni_Wassime avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.