Skip to content

emmanuel-vasseur/score-project

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SCORE PROJECT

Project for coding dojos with tests in junit

Setup

  • Maven 3.X ou +
  • Java 8

SCORE JUNIT

Library to let launch test junit with a Score Mode

Description

Let use de Runner ScoreBlockJUnit4ClassRunner for launch test with a Score mode, you can choose if the test only score when is ok or ko with a maxtime.

Persist your results on a database.

Exemple :

@RunWith(ScoreBlockJUnit4ClassRunner.class)
@Persist(Couchbase.class)
public class BattleCode2016Test {


    @InjectImpl
    protected IBattleCode2016 battleCode2016;


    @Test
    @Score(10)
    public void checkSum_For2and2_then4() {
        // Setup
        int expected = 4;

        // Test
        int result = battleCode2016.sum(2,2);

        // Assertions
        Assertions.assertThat(result).isEqualTo(expected);
    }

    @Test(timeout = 1)
    @Score(value = 500, maxTimeOnly = true)
    public void checkSum_longTretment() throws InterruptedException {
        // Setup
        int expected = 9;

        for (int i = 0; i < 100000; i++) {
            // System.out.println("EO");
        }
        // Test
        int result = battleCode2016.sum(2,2);

        // Assertions
        Assertions.assertThat(result).isEqualTo(expected);
    }
}

SCORE REST API

Spring boot application for share resuts form SCORE JUNIT

SCORE IHM

IHM on Angular to show the SCORE JUNIT results using the SCORE REST API

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%