-
Notifications
You must be signed in to change notification settings - Fork 76
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
Implementing test mod #8
Comments
Hello, thanks for reaching out about this. We are looking into including gametest examples with MultiLoader but it is a new system and we still have some stuff to learn. The CraftTweaker project has had some success with this, however their changes have not made it upstream yet. I will update this issue when we have more to add. |
Hey, with gametest you mean the mojang test suite from 1.18? But these are in the |
Forge patched that MinecraftForge/MinecraftForge#8225 |
Yes, that is what Darkhax is talking about
It depends, the way I have them setup in CraftTweaker is that all the tests are in the but the actual code to trigger those tests is in the Common I forgot why I did it like this, I think I was having trouble getting the fabric entrypoint to see files in the gametest source set Unfortunately I don't have enough time on my hands to spend tinkering with it right now, but I was planning on relooking into it now that Forge has gametest support. If you're talking about JUnit tests however, I did have those setup at some point using the |
No JUnit, I mean just a second mod in the test sourceset which has access to the main sourceset of it's loader + I did it for LootJS with 1.16 and before I knew about 1.18 GameTests. For a single module it was not that hard to setup. But now there is |
Hey I'm trying to implement a testmod for each fabric and forge.
I tried multiple things now but I run into several problems when I try different things.
Goal is that fabric
test
sources have access to commontest
&main
sources. Forgetest
sources should have access to commontest
&main
. And commontest
has access tomain
sources.My tries:
Using testFixtures:
Instead of common
test
atestFixtures
sourceset exists. From the gradle wiki it tells thattestFixtures
has access tomain
but they don't have and I could not figure out why.Dependency to sourceSets example:
adding this to
Fabric
andForge
gradle:Sources seems to have access to each other. At least I don't have errors in the IDE.
###Runconfig for Fabric:
-> Results into fabric just starts without the test mod loaded.
Runconfig for Forge:
--> Crashes because some packages are exported by multiple mods. I assume it's because the mod or the testmod exports the same package? The package names are different. So I don't really understand whats happening here.
When I look into the
build
folders the resources are correct and the mods have theirmods.toml
orfabric.mod.json
file.I mostly tried to learn from this and the links they added: https://stackoverflow.com/questions/5644011/multi-project-test-dependencies-with-gradle
And sorry for my english ._.'
The text was updated successfully, but these errors were encountered: