All Projects → aashutoshrathi → Testcase-Generator

aashutoshrathi / Testcase-Generator

Licence: MIT license
⚡️ Handy script for HackerRank, HackerEarth and CodeChef TCs Generation.

Programming Languages

python
139335 projects - #7 most used programming language
EJS
674 projects
javascript
184084 projects - #8 most used programming language
C#
18002 projects
java
68154 projects - #9 most used programming language
go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Testcase-Generator

TimeBomb
Stops app usage after a period of time has passed starting from app build date.
Stars: ✭ 22 (-74.12%)
Mutual labels:  testing-tools
qiniutest
Qiniu httptest tool: qiniutest
Stars: ✭ 36 (-57.65%)
Mutual labels:  testing-tools
kheera-testrunner-android
BDD Framework for Android
Stars: ✭ 18 (-78.82%)
Mutual labels:  testing-tools
rfswarm
Robot Framework Swarm
Stars: ✭ 68 (-20%)
Mutual labels:  testing-tools
combinate
Combinatorics generator for JavaScript and Typescript.
Stars: ✭ 20 (-76.47%)
Mutual labels:  testing-tools
pytest-watcher
Rerun pytest when your code changes
Stars: ✭ 60 (-29.41%)
Mutual labels:  testing-tools
fakerfactory
伪造数据的API服务
Stars: ✭ 53 (-37.65%)
Mutual labels:  testing-tools
playwright-pytest
Pytest plugin to write end-to-end browser tests with Playwright.
Stars: ✭ 214 (+151.76%)
Mutual labels:  testing-tools
CDSpace
A HTTP interface test tool. CDSpace can send HTTP request and mock HTTP server.
Stars: ✭ 30 (-64.71%)
Mutual labels:  testing-tools
Competitive-Programmming
Questions solved from Various Coding websites viz. HackerRank, HackerEarth, CodeChef, CodingNinja and other websites. This repository also contains Questions from various offline and onsite competitions. Programs that we find in the competitions and some brainstorming questions
Stars: ✭ 103 (+21.18%)
Mutual labels:  hackerrank
xray-action
... a GitHub action to import test results into "Xray" - A complete Test Management tool for Jira.
Stars: ✭ 16 (-81.18%)
Mutual labels:  testing-tools
behat-code-coverage
Generate Code Coverage reports for Behat tests
Stars: ✭ 48 (-43.53%)
Mutual labels:  testing-tools
retox
For running a local continuous testing environment with tox
Stars: ✭ 77 (-9.41%)
Mutual labels:  testing-tools
BaseUrlManager
⛵ BaseUrlManager的设计初衷主要用于开发时,有多个环境需要打包APK的场景,通过BaseUrlManager提供的BaseUrl动态设置入口,只需打一次包,即可轻松随意的切换不同的开发环境或测试环境。在打生产环境包时,关闭BaseUrl动态设置入口即可。
Stars: ✭ 43 (-49.41%)
Mutual labels:  testing-tools
datastructures-and-algorithms
Repository for studying/practicing Data Structures, Algorithms and Code Interview Problems.
Stars: ✭ 30 (-64.71%)
Mutual labels:  hackerrank
php-test-generator
Generate test cases for existing PHP files
Stars: ✭ 47 (-44.71%)
Mutual labels:  testing-tools
smhasher
No description or website provided.
Stars: ✭ 65 (-23.53%)
Mutual labels:  testing-tools
Foxss-XSS-Penetration-Testing-Tool
Foxss is a simple php based penetration Testing Tool.Currently it will help to find XSS vulnerability in websites.
Stars: ✭ 35 (-58.82%)
Mutual labels:  testing-tools
Shot
Screenshot testing library for Android
Stars: ✭ 951 (+1018.82%)
Mutual labels:  testing-tools
vm-automation
VirtualBox automation using Python
Stars: ✭ 1 (-98.82%)
Mutual labels:  testing-tools

Testcase Generator

Handy script to generate Test Cases for HackerRank, HackerEarth and CodeChef Problems

Are you a Problem Author? The toughest part of creating a problem is creating tricky, correct and constrained Test Cases. Well, here is a handy Python Script, for your respective logic (solution).

Table of Contents

Mentions

  • Blog post on experince in NWoC 2018 by Rounak Agarwal.
  • Selected as project in GSSoC 2019
  • Selected as project in NJACKWinterOfCode 2018

Supported Languages

The following languages are supported for testcase generation:

Install

How to Use ? 😃

  • Clone the repository $ git clone https://github.com/aashutoshrathi/Testcase-Generator.git

  • Create a virtual environment $ virtualenv venv (click here to read about activating virtualenv)

    • Activate virtualenv (Linux)

      $ source ./venv/bin/activate
    • Activate virtualenv (Windows)

       $ cd venv/Scripts/
       $ activate
  • Install requirements and modules

   $ pip install -r requirements.txt
   $ pip install -e .
  • Change directory to tc_generator
   $ cd tc_generator/
  • Edit the logic file of the language of your choice with the code for which you want to generate TCs NOTE: Make sure to keep the classname as 'logic' in java so that it can compile to 'logic.class'
  • Edit the Input area in tc_gen.py according to the input format you wish to generate
  • Run the project
   $ python tc_gen.py
  • Enter your choice of language when prompted
  • Enter the choice of platform when prompted
  • The input and output files would be generated and stored in test-cases.zip for HackerRank & HackerEarth and test-cases directory for CodeChef.

Tip: If you're creating testcases for CodeChef then you can validate that the input sequence is generated according to the constraints using this validator file. 😉

How it Works ? 🤔

Demo

Setup using Docker 🐳

  docker build . --tag=tcgen
  docker run -p 4000:80 tcgen

Running Tests

  • Change Directory to Testcase-Generator
  $ cd Testcase-Generator/
  • Install requirements and modules
   $ pip install -r requirements.txt
   $ pip install -e .
  • Run pytest
  $ pytest
  • If no tests fail, the generator is working correctly.

FAQ 📃

  1. How do I compile with a different version of C++? Changing Line 22 in lang_compiler.py to the line below will compile the file with C++ 17. You can replace the '17' with '11', '14' or '20' in the line below to compile with the respective versions.
'compile': ['g++', f'{CMD}.cpp', '-o', CMD, '-std=c++17']},
  1. What line ending does it saves the testcases in? It saves the files with Linux style file endings (LF) in both Linux and Windows (unless the file is opened and saved again in WIndows that may change it to CRLF).

Contributors

Thanks goes to these wonderful people (emoji key):


Aashutosh Rathi

🔧 📆 👀 🐛 💻

Pushkar Patel

🚧 ⚠️ 🐛 💻

Pritha Upadhyay

🚧 ⚠️ 🐛 💻

Vishnu Ramana

📖

Tim Rossback

📖

Sasivarnan R

📖

Gerardo Gálvez

💻

Dastgir

📖

Sai Adarsh S

📖

Rounak Agarwal

💻 📝

This project follows the all-contributors specification. Contributions of any kind welcome!

Stargazers over time 📈

Stargazers over time

Made with by Aashutosh Rathi

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].