Coder Social home page Coder Social logo

battledev-junit's Introduction

Battledev Junit Project

How to use

You can use this project with the IsoGrad or BattleDev platforms.

Once you pick-up the exercice you want to solve, download the sample using the "Download" button on the website IDE.

Open the SampleRunnerTest file.

Fill in the executors variable with the technology you want to use (you can comment lines with the technology your aren't using)

// Example for PHP
private val executors = listOf(
    PhpExecutor("src\\main\\php\\main.php")
)

// Example for Python
private val executors = listOf(
    Python3Executor("src\\main\\python\\main.py"),
)


// Example for Java
private val executors = listOf(
    JavaExecutor(IsoContest::main),
)


// Example for Kotlin
private val executors = listOf(
    KotlinExecutor(::main),
)

Define the zip file location where you downloaded the sample using the zipSamplePath variable.

Then run your code with the sample using the command

mvnw test

Tips: If you are using Intellij, you can use the green arrow in the SampleRunnerTest file and enjoy the JUnit report integrated in Intellij.

Tips: If you only use one technology, you can delete the others folders in the src/main folder to speed up the compilation time.

Todo

  • Debug mode for Python (pdb ?)
  • Debug mode for PHP (Xdebug)
  • Allow using directly the URL link for the sample file (instead of download the file and set the location on the filesystem)
  • Externalize Executor, zipSamplePath, and showOutput in a dedicated configuration file

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.