Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Maty's GameTest gist into Neo repo #1416

Merged
merged 4 commits into from
Aug 7, 2024

Conversation

TelepathicGrunt
Copy link
Contributor

@TelepathicGrunt TelepathicGrunt commented Aug 4, 2024

Original gists:
https://gist.github.com/Matyrobbrt/832c0d88a90ae15f5f665bb794a48198
https://gist.github.com/Matyrobbrt/cac2427748a51ff2bfc82fcd03606b55

Someone should write one for JUnit tests as well for balance, as all things should be

Make sure this is merged with no build made somehow

@TelepathicGrunt TelepathicGrunt added documentation Improvements or additions to documentation 1.21 Targeted at Minecraft 1.21 labels Aug 4, 2024
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Aug 4, 2024

  • Publish PR to GitHub Packages

Last commit published: f7f704804bb4da3ff581d76403d9c68d9da0ff63.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #1416' // https://github.com/neoforged/NeoForge/pull/1416
        url 'https://prmaven.neoforged.net/NeoForge/pr1416'
        content {
            includeModule('net.neoforged', 'testframework')
            includeModule('net.neoforged', 'neoforge')
        }
    }
}

MDK installation

In order to setup a MDK using the latest PR version, run the following commands in a terminal.
The script works on both *nix and Windows as long as you have the JDK bin folder on the path.
The script will clone the MDK in a folder named NeoForge-pr1416.
On Powershell you will need to remove the -L flag from the curl invocation.

mkdir NeoForge-pr1416
cd NeoForge-pr1416
curl -L https://prmaven.neoforged.net/NeoForge/pr1416/net/neoforged/neoforge/21.0.166-pr-1416-GametestDocs/mdk-pr1416.zip -o mdk.zip
jar xf mdk.zip
rm mdk.zip || del mdk.zip

To test a production environment, you can download the installer from here.

shartte
shartte previously approved these changes Aug 4, 2024
docs/MCGAMETESTS.md Outdated Show resolved Hide resolved
docs/NEOGAMETESTS.md Outdated Show resolved Hide resolved
@Matyrobbrt
Copy link
Member

Please also link the second file in the CONTRIBUTING.md file under section 8, a subsection that says something along the lines of "Write an (automated) test under the tests project, if possible".

@Matyrobbrt
Copy link
Member

Oh also, since this is a documentation update PR, can you also update the readme to mention 1.21 as active support?

docs/MCGAMETESTS.md Outdated Show resolved Hide resolved
@HenryLoenwind
Copy link
Contributor

BTW, has someone cross-checked this against https://docs.neoforged.net/docs/misc/gametest/ ? Are they equivalent? Is this a superset (then the website docs should mention this one as further reading)?

@TelepathicGrunt
Copy link
Contributor Author

@HenryLoenwind Pretend you are making a NeoForge PR and you need to write a gametest. Now look at the Game Test doc. Then the gametest file in this PR. Which one is going to set you up better for writing a game test?

@HenryLoenwind
Copy link
Contributor

@HenryLoenwind Pretend you are making a NeoForge PR and you need to write a gametest. Now look at the Game Test doc. Then the gametest file in this PR. Which one is going to set you up better for writing a game test?

Clearly the doc. It's the only one of the two that actually tells me how to run the tests.

But that was not my question. The question was if there's anything in this one that is generic and should go into the docs instead to avoid repetition---and here I'm assuming stuff in this one doesn't exist for mods and only neo's dev env, which is something that's not clear from taking a quick look at this one either.

So again, has someone who actually understands this stuff cross-checked this with the docs to eliminate duplications? Is there something in here that would better go into the docs or something that would better reference the docs and explain the differences instead of repeating them?

@TelepathicGrunt
Copy link
Contributor Author

I find the file here far easier to follow than the docs. The docs broke up the examples too much into piecewise and I can't follow them any more and have no idea how any of the gametest is put together. The example here is more complete and actually shows the context of how it is put together. That is my opinion.

@Matyrobbrt Matyrobbrt merged commit 4aa213f into neoforged:1.21.x Aug 7, 2024
6 checks passed
@neoforged-releases
Copy link

🚀 This PR has been released as NeoForge version 21.0.165.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21 Targeted at Minecraft 1.21 documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants