Skip to content

Latest commit

 

History

History
74 lines (52 loc) · 2.96 KB

testing.md

File metadata and controls

74 lines (52 loc) · 2.96 KB

Testing

Run ./test, then open your Minecraft client to connect to localhost and try the following.

Story DSL

  1. /story test
  2. Verify test.story happened as expected

Blockly

TODO Replace this with a saved Blockly instead of Scratch project... First test that Eric's (!) saved project (which is in git) works:

  1. Right click Piggy and verify it says "Hello, my friend!"
  2. type /scratch_test verify the title shown

Now test that you can make a new project:

  1. Open http://localhost:7070/index.html TODO support command /make and click the link in the Minecraft Chat to open the Blockly-based UI in the browser
  2. Add
    • Events > When / demo
    • Actions > Title Hello!
    • Actions > Piggy speaks Hello!
  3. /demo command in Minecraft should now make the entity Piggy speak
  4. Drag a whenInside block and add a name of the region trigger
    • Your player will get a special axe to "draw" the region with
      • Use left mouse to set the first point of a box
      • Right mouse to set the second point of a box
    • Now any time a player enters the block beneath will be executed

TODO Update the following, after Blockly will be made to reload previous projects?

  1. close Browser
  2. TODO /demo should still work, but currently doesn't anymore (because project JSON wasn't automagically moved from /minecraft-server-test-data/config/storeys-web/working/ to storeys-web/scratch/)
  3. /make again
  4. Verify that previously created blocks still appear
  5. TODO bug #310 /demo should still work, but currently doesn't, because of IllegalArgumentException: A plugin may not register multiple commands for the same alias ('demo') in log; this needs more thoughts in general.

JavaScript (v2, embedded in .story)

  1. /story js
  2. Verify js.story happened as expected

JavaScript (v3, new-scripts/*.js)

  1. /new
  2. Verify test.js happened as expected
  3. _TODO Walk to the cacti and jump on top and make sure a "you jumped!" is shown as title
  4. Edit test.js to change m.title("Hello"); to m.title("hello, world");
  5. /new
  6. Verify title shown changed

Java

  1. /example
  2. Verify ExampleScript.java happened as expected
  3. /another
  4. ditto
  5. Right click Piggy and verify it says (narrates) "Oink!"

We do not support "hot reloading" these Java plugins (yet, but we could).

Troubleshooting

To see what's going on inside the container, use:

podman exec -it storeys bash

Clean Up

Run ./clean, this WILL LOOSE any in-game world changes that are ignored and not commited to git!