Skip to content

iv4xr-project/iv4xr-jmonkey-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iv4xr-jmonkey-demo

Contain a simple demo of writing an aplib test for a JME game.

As the demo we will use a simple JME game called Rolling the Monkey. The game is originally provided as an example game by JME. For convenience, we have copied it into this project. A screenshot is shown below.

Screen-shot Rolling the Monkey

The game shows a bowling ball and a number of small boxes. The aim is to roll the ball to hit the boxes. Hitting a box will add 1 to the score (and remove the box from the game).

Running the demo

  • This is a Maven project. Import the project into Eclipse IDE.
  • In Eclipse, change the project properties --> Java Build Path: add ./libs/JME/jMonkeyEngine3.jar as an external jar to the project build path.
  • Then run the demo-test-class (see below) as a Junit test.

Sample aplib test

A simple example of an aplib test can be found in the class Test_RollingTheMonkey. The class contains one test-method named test_SUT_exampeleUsingAplib. Run this method as a Junit test.

The method performs the following test scenario is as follows:

  1. At the game start, the bowling ball is dropped from some height. Wait first until the ball is on the table surface.
  2. Steer the ball until it hits box nr 3.
  3. During this scenario the test checks:
    • at the beginning there are 16 boxes, and the player's score is 0.
    • after box-3 is hit, we check that the box is removed from the game, and the score is now 1.

The test passes if the scenario can be completed and the two checks above are passed. Else the tests fails.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages