Coder Social home page Coder Social logo

icalendar-stresser's Introduction

iCalendar Stresser

This release consists of four test harnesses that contain a combined total of over 5000 automated test cases used to test three functions of the CIS*2750 iCalendar web app: createCalendar(), writeCalendar(), and validateCalendar(). I developed these test harnesses from scratch in C alongside the development of my iCalendar web app during the course. This project was to take place over the course of one academic semester at the University of Guelph and accounted for a majority of the grade.

In creating the RESTful web app mentioned above, we were first instructed to create a C backend that parsed standard RFC 5545 iCalendar files. As the prof.'s assignment specification was strict, we all had to use the same function definitions, akin to an API. Keeping this in mind, I created iCalendarStresser in order to streamline testing of valid and invalid inputs against the project API in order to make the 'Angel of Death' course much more bearable for me and my cohort.

iCalendarStresser consists of:

  • four .c files that automate the testing process by means of API calls
  • a repository of 96 iCalendar (*.ics) test cases organized by error invoked (credits to BenFort and other people in my cohort for contributing many of these cases for the harness)
  • a Makefile that automates the test running process

Summary of Tests

  • A1harness (wiki)—iCalendar parsing stress test; tests createCalendar()'s ability to parse valid and invalid calendar files correctly
    • 7 tests for INV_FILE (invalid file)
    • 12 tests for INV_CAL (invalid Calendar object)
    • 5 tests for INV_VER (invalid version)
    • 4 tests for DUP_VER (duplicate version value)
    • 3 tests for INV_PRODID (invalid product ID)
    • 4 tests for DUP_PRODID (duplicate product ID)
    • 13 tests for INV_EVENT (invalid event)
    • 5 tests for INV_DT (invalid date/time)
    • 10 tests for INV_ALARM (invalid alarm)
    • 6 tests that run badly formatted files (no expected error)
    • 2 tests that highlight undefined issues in the assignment specification (no expected error)
    • 3 tests for NULL function arguments (NULL & NULL, NOT NULL & NULL, NULL & NOT NULL)
    • 18 tests for OK (valid file)
  • A2m1harness (wiki)—iCalendar parsing and filewriting stress test; tests createCalendar() and writeCalendar()'s ability to open a valid iCalendar file and re-export it identically with the help of printCalendar().
    • 19 valid files are parsed into Calendar objects using createCalendar(). They are then re-written to disk in a dedicated exports folder, then a character-by-character comparison of the two files' printing outputs (from printCalendar()) is done. Test(s) fail if the resultant files don't match exactly or the initial createCalendar() call fails to return OK.
  • A2m2harness (wiki)—calendar object validation stress test; tests validateCalendar()'s ability to validate existing Calendar data objects
    • 39 tests for INV_CAL (invalid Calendar object)
    • 116 tests for INV_EVENT (invalid Event object)
    • 104 tests for INV_ALARM (invalid Alarm object)
    • 273 collision tests for simultaneous INV_CAL and INV_EVENT errors (INV_CAL takes precedence)
    • 208 collision tests for simultaneous INV_CAL and INV_ALARM errors (INV_CAL takes precedence)
    • 336 collision tests for simultaneous INV_EVENT and ENV_ALARM errors (INV_EVENT takes precedence)
    • 4368 collision tests for simultaneous INV_CAL, INV_EVENT, and INV_ALARM errors (INV_CAL takes precedence)
    • 39 tests for OK (valid Calendar object)
  • A2m2harnessv (wiki)validateCalendar()—calendar object error priority vulnerability test
    • 1 test for cross-event error collision between INV_EVENT and INV_ALARM (INV_EVENT takes precedence)

Screenshots

A1harness (createCalendar())

A screenshot of the first harness

A2m1harness (createCalendar(), writeCalendar(), printCalendar())

A screenshot of the second harness

A2m2harness (validateCalendar())

A screenshot of the third harness

A2m2harnessv (validateCalendar())

A screenshot of the fourth harness

icalendar-stresser's People

Contributors

jnguyen1098 avatar

Stargazers

 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.