bresc19 / sagrada_familia

A Boarder Game from Cranio Games. Software Engineering Project 2017-2018
0 stars 0 forks source link

Test issues #4

Closed valerio-castelli closed 6 years ago

valerio-castelli commented 6 years ago

Good afternoon, There is an issue with your pom.xml configuration that prevents Jenkins from successfully identifying and building your tests. Please follow the "junit 5 maven" guide that you can find on Google to fix the pom and make sure that you are able to run your tests within IntelliJ using a maven build configuration with "test" as goal.

bresc19 commented 6 years ago

good afternoon! sorry for the delay..now it would work!

valerio-castelli commented 6 years ago

We are now correctly seeing your tests. Please be aware though that a significant number of them are failing at the moment! Tests in error: PlayerTest.setAttributes:80 SetSchemasTest.deliverTest:35 » IndexOutOfBounds toIndex = 4 PrivateCardTest.null_score:61 » FileNotFound src/main/data/PrivCard/4.json (No... PrivateCardTest.scoreColour:53 » FileNotFound src/main/data/PrivCard/4.json (N... DeckPrivTest.correctExtract:24 » IndexOutOfBounds Index: 0, Size: 0 DeckPrivTest.correct_extract:31 » IndexOutOfBounds Index: 0, Size: 0 AlesatoreTest.correct_use:80->setupSchema:56 NullPointer AlesatoreTest.wrong_use:94->setupSchema:56 NullPointer DiluenteTest.correct_insertion:87->setupSchema:61 NullPointer DiluenteTest.wrong_insertion:102->setupSchema:61 NullPointer LathekinTest.correct_use:84->setupSchema:60 NullPointer LathekinTest.wrong_use:99->setupSchema:60 NullPointer PennelloEglomiseTest.correct_use:84->setupSchema:58 NullPointer PennelloEglomiseTest.noDice:110->setupSchema:58 NullPointer PennelloEglomiseTest.wrong_use:98->setupSchema:58 NullPointer PennelloPastaSaldaTest.not_pending:97->setupSchema:60 NullPointer PennelloPastaSaldaTest.roll_diceSpace:86->setupSchema:60 NullPointer PennelloPastaSaldaTest.roll_insertion:74->setupSchema:60 NullPointer RigaTest.correct_use:86->setupSchema:61 » NullPointer RigaTest.notSetDice:111->setupSchema:61 » NullPointer RigaTest.wrong_use:99->setupSchema:61 » NullPointer TaglierinaManualeTest.correct_use1:121 NullPointer TaglierinaManualeTest.correct_use2:73 NullPointer TaglierinaManualeTest.wrong_use:98->num_dice:62 NullPointer GameMultiTest.gameInitTest:39 » IndexOutOfBounds Index: 0, Size: 0 SessionTest.join_players:51 » IndexOutOfBounds Index: 0, Size: 0 SessionTest.remove_player:80 » IndexOutOfBounds Index: 0, Size: 0 AdjacentRuleTest.correctInsertion:31 » FileNotFound src/main/data/Schema/24.js... AdjacentRuleTest.wrongInsertion:63 » FileNotFound src/main/data/Schema/24.json... ColourRuleTest.correctInsertion:31 » FileNotFound src/main/data/Schema/24.json... ColourRuleTest.wrongInsertion:45 » FileNotFound src/main/data/Schema/24.json (... EmptyRuleTest.correctInsertion:32 » FileNotFound src/main/data/Schema/24.json ... EmptyRuleTest.wrongInsertion:44 » FileNotFound src/main/data/Schema/24.json (N... NumberRuleTest.correctInsertion:31 » FileNotFound src/main/data/Schema/24.json... NumberRuleTest.wrongInsertion:44 » FileNotFound src/main/data/Schema/24.json (... RulesManagerTest.correctInsertion:32 » FileNotFound src/main/data/Schema/24.js... RulesManagerTest.wrongInsertion:44 » FileNotFound src/main/data/Schema/24.json...

Tests run: 103, Failures: 0, Errors: 37, Skipped: 0

bresc19 commented 6 years ago

We've already discussed with Niccolò about this problem in the last deadline. The problem is that every test on our computer run successfully with intellij and also in maven :

Results :

Tests run: 103, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.179 s [INFO] Finished at: 2018-05-25T09:38:35+02:00 [INFO] Final Memory: 11M/224M [INFO] ------------------------------------------------------------------------

We think that the cause (seen your errors) is your wrong import of schemas json file (schemas are imported by SchemaInit(Int n) in Schema class) placed on "src/main/data/schema/24.json". Every test failed infact calls this method. For a strange reason we think that you can't import json from "data" folder (but differently we can). We'll try to move json file in a different path (maybe work). The problem is that we have no way to see if test runs successfully on your machine. If it didn't work we would discuss with you to solve this problem in next lesson . It's very strange we can import them and you can't.

Matteo

michele-bertoni commented 6 years ago

Lots of tests are still failing:

Test Name Duration Age
it.polimi.ingsw.serverTest.modelTest.boardTest.DiceBagTest.FinishDice 0 ms 8
it.polimi.ingsw.serverTest.modelTest.cardsTest.objCardTest.ColumnsCTest.scoreIs4 1 ms 10
it.polimi.ingsw.serverTest.modelTest.cardsTest.objCardTest.ColumnsCTest.scoreIs5 2 ms 10
it.polimi.ingsw.serverTest.modelTest.cardsTest.objCardTest.ColumnsCTest.score_null 1 ms 10
it.polimi.ingsw.serverTest.modelTest.cardsTest.objCardTest.CoupleCTest.null_score 2 ms 10
it.polimi.ingsw.serverTest.modelTest.cardsTest.objCardTest.CoupleCTest.CorrectScore 1 ms 10
it.polimi.ingsw.serverTest.modelTest.cardsTest.objCardTest.DiagonalCTest.CorrectScore1 1 ms 10
it.polimi.ingsw.serverTest.modelTest.cardsTest.objCardTest.DiagonalCTest.CorrectScore2 1 ms 10
it.polimi.ingsw.serverTest.modelTest.cardsTest.objCardTest.DiagonalCTest.nullScore 3 ms 10
it.polimi.ingsw.serverTest.modelTest.cardsTest.objCardTest.RowsCTest.CorrectScore_5points 2 ms 10
it.polimi.ingsw.serverTest.modelTest.cardsTest.objCardTest.RowsCTest.CorrectScore_6points 1 ms 10
it.polimi.ingsw.serverTest.modelTest.cardsTest.objCardTest.RowsCTest.score_null 1 ms 10
it.polimi.ingsw.serverTest.modelTest.cardsTest.objCardTest.SetCTest.score_correct_colour 1 ms 10
it.polimi.ingsw.serverTest.modelTest.cardsTest.objCardTest.SetCTest.score_correct_number 2 ms 10
it.polimi.ingsw.serverTest.modelTest.cardsTest.objCardTest.SetCTest.score_null 7 ms 10
it.polimi.ingsw.serverTest.modelTest.ruleTest.DicesRuleTest.correctInsertion 0 ms 13
it.polimi.ingsw.serverTest.modelTest.ruleTest.DicesRuleTest.wrongInsertion 0 ms 13
it.polimi.ingsw.serverTest.modelTest.gameTest.SessionTest.join_players 62 ms 36
it.polimi.ingsw.serverTest.modelTest.boardTest.PlayerTest.setAttributes 0 ms 38
it.polimi.ingsw.serverTest.modelTest.boardTest.SetSchemasTest.deliverTest 0 ms 38
it.polimi.ingsw.serverTest.modelTest.cardsTest.PrivateCardTest.null_score 2 ms 38
it.polimi.ingsw.serverTest.modelTest.cardsTest.PrivateCardTest.scoreColour 1 ms 38
it.polimi.ingsw.serverTest.modelTest.cardsTest.deckTest.DeckPrivTest.correct_extract 21 ms 38
it.polimi.ingsw.serverTest.modelTest.cardsTest.deckTest.DeckPrivTest.correctExtract 2 ms 38
it.polimi.ingsw.serverTest.modelTest.gameTest.GameMultiTest.gameInitTest 2 ms 38
it.polimi.ingsw.serverTest.modelTest.gameTest.SessionTest.remove_player 91 ms 38
it.polimi.ingsw.serverTest.modelTest.ruleTest.AdjacentRuleTest.correctInsertion 0 ms 38
it.polimi.ingsw.serverTest.modelTest.ruleTest.AdjacentRuleTest.wrongInsertion 0 ms 38
it.polimi.ingsw.serverTest.modelTest.ruleTest.ColourRuleTest.correctInsertion 0 ms 38
it.polimi.ingsw.serverTest.modelTest.ruleTest.ColourRuleTest.wrongInsertion 0 ms 38
it.polimi.ingsw.serverTest.modelTest.ruleTest.EmptyRuleTest.correctInsertion 0 ms 38
it.polimi.ingsw.serverTest.modelTest.ruleTest.EmptyRuleTest.wrongInsertion 0 ms 38
it.polimi.ingsw.serverTest.modelTest.ruleTest.NumberRuleTest.correctInsertion 0 ms 38
it.polimi.ingsw.serverTest.modelTest.ruleTest.NumberRuleTest.wrongInsertion 0 ms 38
it.polimi.ingsw.serverTest.modelTest.ruleTest.RulesManagerTest.correctInsertion 1 ms 38
it.polimi.ingsw.serverTest.modelTest.ruleTest.RulesManagerTest.wrongInsertion 0 ms 38
bresc19 commented 6 years ago

I move json file (they are the main problem) on resources Directory. now it works? I ask you because, as i told before, we cannot see if test runs on your machine. (on our machine they run perfectly)

michele-bertoni commented 6 years ago

Now "only" 7 tests are failing:

Test Name Duration Age
it.polimi.ingsw.serverTest.modelTest.gameTest.SessionTest.join_players Stack Tracejava.lang.NullPointerException at it.polimi.ingsw.serverTest.modelTest.gameTest.SessionTest.join_players(SessionTest.java:51)  Standard Output Standard Error 12 ms 39
it.polimi.ingsw.serverTest.modelTest.cardsTest.PrivateCardTest.null_score Stack Tracejava.lang.NullPointerException at it.polimi.ingsw.serverTest.modelTest.cardsTest.PrivateCardTest.null_score(PrivateCardTest.java:66) 0 ms 41
it.polimi.ingsw.serverTest.modelTest.cardsTest.PrivateCardTest.scoreColour Stack Tracejava.lang.NullPointerException at it.polimi.ingsw.serverTest.modelTest.cardsTest.PrivateCardTest.scoreColour(PrivateCardTest.java:54) 0 ms 41
it.polimi.ingsw.serverTest.modelTest.cardsTest.deckTest.DeckPrivTest.correct_extract Stack Tracejava.lang.NullPointerException at it.polimi.ingsw.serverTest.modelTest.cardsTest.deckTest.DeckPrivTest.(DeckPrivTest.java:18) 10 ms 41
it.polimi.ingsw.serverTest.modelTest.cardsTest.deckTest.DeckPrivTest.correctExtract Stack Tracejava.lang.NullPointerException at it.polimi.ingsw.serverTest.modelTest.cardsTest.deckTest.DeckPrivTest.(DeckPrivTest.java:18) 0 ms 41
it.polimi.ingsw.serverTest.modelTest.gameTest.GameMultiTest.gameInitTest Stack Tracejava.lang.NullPointerException at it.polimi.ingsw.serverTest.modelTest.gameTest.GameMultiTest.gameInitTest(GameMultiTest.java:39)  Standard Error 10 ms 41
it.polimi.ingsw.serverTest.modelTest.gameTest.SessionTest.remove_player Stack Tracejava.lang.NullPointerException at it.polimi.ingsw.serverTest.modelTest.gameTest.SessionTest.remove_player(SessionTest.java:80)  Standard Output Standard Error 10 ms 41
bresc19 commented 6 years ago

I've modified again. Maybe i fix the problem. I wait your response.

michele-bertoni commented 6 years ago

Fixed.

michele-bertoni commented 6 years ago

One test is failing:

Test Name Duration Age
it.polimi.ingsw.serverTest.modelTest.gameTest.SessionTest.remove_player Error Details-1 Stack Tracejava.lang.ArrayIndexOutOfBoundsException: -1 at it.polimi.ingsw.serverTest.modelTest.gameTest.SessionTest.remove_player(SessionTest.java:81)  Standard Outputconnected players in lobby: 1 --- connected players in lobby: 2 --- connected players in lobby: 3 --- Giocatore3 disconnected: players in lobby: 2 --- connected players in lobby: 3 --- connected players in lobby: 4 --- starting game --- game started: waiting for players to choose their schema --- 69 ms 3
bresc19 commented 6 years ago

fixed now!

michele-bertoni commented 6 years ago

Fixed.