Giter Site home page Giter Site logo

stresstestsuite's Introduction

Note - We currently only support Linux

StressTestSuite

A collection of scripts to generate common competitive programming testcases on Linux.

What is Stress Testing?

Have you ever been in sitauation where you have written a state-of-the-art algorithm for some task but it your code is generating incorrect output? If yes, have you ever felt lazy to manually generate test cases to detect the bug in your code? Well stress testing solves this very problem. The idea is that instead of generating test cases manually, you write a simple brute force solution that solves the same problem that you are trying to solve with your state-of-the-art algorithm and then leave it to your computer to randomly generate test cases till the ouptuts of both programs don't match.

How to use

  1. Write a bruteforce solution, compile it, and name the executable brute.
  2. Compile the solution you want to stress-test and name the executable A.
  3. At the end of gen.py, add your code to generate desired test cases.
  4. Let the stress testing begin! Run test.sh and let it do the hard work for you. Once it finds a mismatch, it will print "Wrong Answer" on your screen and the failed testcase can be found in testcase.in. Your program's output on this test case can be found in the file A.out and your bruteforce solution's output can be found in B.out

What does each file do?

  1. gen.py : Use this to generate random testcases by invoking the various functions provided
  2. check.py : Script used by test.sh to check if outputs of the two executable programs match.
  3. test.sh : This shell scripts creates a random testcase, runs two exectuables simultaneously on the random testcase and checks if the outputs match. It repeats this for 10,000 random test cases.

stresstestsuite's People

Contributors

vastolorde95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.