-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Improved the way to test your code #1233
base: master
Are you sure you want to change the base?
Conversation
aa308e5
to
aa27891
Compare
Did you test your recommended way to get started testing own changes? |
That does not seem an issue with the test |
I ran the build and it worked |
can you tell me what I did |
I just did what you described. Copied the class in the same directory, right-clicked the file and executed it. Not sure what I would be doing wrong. To verify if it's only my fault, please try to execute a bot in the same way as I did. |
I mean I don't have a bot token at hand right now |
but did you change the class name and set a token |
I also ran the normal tests and it also threw an error. For some reason it seems like gradle doesn't like running with Java 17 in Javacord. When I switched to 11 it worked fine. |
Will see if I am able to do the latter part of your message |
Would it be alright to add a .xml file for logging like https://github.com/YDWK/YDWK/blob/master/src/test/resources/logback.xml in the test folder. It says what logging you want and where from. |
We already have a logging file and this will most likely not work because you will also affect the logging level for the normal tests, that's why I said the configuration has to be separated somehow. |
Can we leave that for a separate pr |
8c07d95
to
5d7c3f1
Compare
But then what's the point of this PR if it is not really suitable for getting started with testing? Then, I think using the current way to create a test class is easier than having to deal with the logging configuration. |
but this serves as a template for a test class and to know where to test. Makes it easer. |
5d7c3f1
to
07dc1dd
Compare
I could look at how to make the logging work |
Checklist
Changelog
Breaking Changes
Description
Closes: NaN
Footnotes
At least started a running bot instance with your changes and triggered an event so your changed code gets executed. ↩