Stress Testing in CppFastOlypmicCoding plugin in Sublime Text
Stress Testing is a software testing technique that determines the robustness of software by testing beyond the limits of normal operation. Stress Testing is useful when anyone needs to find out corner test cases for problems, which work on the sample test case but get WA (wrong answer) on submission.
Sublime Text along with CppFastOlympicCoding plugin provides a lot of features to ease up and expedite the process of writing and testing code for competitive programmers. Stress Testing is also one of the useful features of this plugin.
Before proceeding further with the article make sure to install the MinGW compiler and change environment variables
Install the latest version of Sublime Text from https://www.sublimetext.com/.
Must Read – Setting up Sublime Text For Competitive Programming (C++) Using Fast Olympic Coding Plugin
Setting up Sublime Text and CppFastOlymicCoding plugin
Step 1: In Sublime Text open the command pallet by navigating to Tools -> Command Palette or using key binding Ctrl+Shift+B.
Step 2: Type Install package control to install package controller for sublime text. The package controller helps in downloading different packages for sublime text.
Step 3: Type Package Control: Install Package in command pallet and search for C++ & C Single File Builder – Minghang Yang package.
Step 4: After installing select the Build System as C++ Builder Minghang Yang.
Step 5: Now you can run a C++ program using the command Ctrl+B.
Step 6: Type Package Control: Install Package in the command pallet and search and install CppFastOlympicCoding by Jatana.
How to use the Stress Testing Feature?
Step 1: For using the Stress Testing feature you need to create three files in the same director namely
- <name>.cpp – program that works incorrectly.
- <name>__Good.cpp – program that works correct.
- <name>__Generator.cpp – program that generates tests, you can read a seed for a random generator in the input
Step 2: Navigate to the <name>.cpp file (Ex: test.cpp); Open the Command palette and type Make Stress or FastOlympicCoding: Make Stress then press enter.
Step 3: To stop Stress Testing open Command Palette and type Stop Stress or FastOlympicCoding: Stop Stress then press enter.
Please Login to comment...