-
Notifications
You must be signed in to change notification settings - Fork 162
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
Editor Testing Frameworks #1035
Comments
I propose NUnit and NSubstitute, simply because these are the tools I use, and I know they are very good. If no one makes objections in a reasonable amount of time (a few days?) I'll make a PR for it |
what kind of tests ? |
Unit Tests to begin with |
I think the question is rather, what functionality do you want to test. |
The idea for starting out is just to make the infrastructure for testing available, I don't have plans to write 90% plus test coverage or even 5%. This is important because I've fixed bugs in the past where having tests could have made my workflow smoother instead of manually testing every case for every change for every feedback. So no specific functionality is what I'm trying to say I guess My motivation for having test frameworks available is because I'm researching if I'm capable of solving the issue of "All the room management should be reimplemented in .NET." as stated in #469, and I think it might help to have tests that checks that room handling works as it should before I start messing with it. |
right. i'm asking because "writing tests for the editor" actually sounds as if it would require some click automation software like autoit in order to assert that clicking certain stuff in GUI produces the desired result. |
I've twice started something similar, using XUnit. I think it would be OK to add it tests for specific parts which are being modified (and write new code to be testable), but I'm not sure how much of the existing C# code will exist long term (so aiming for total test coverage could end up being a waste) as there isn't a long term plan at the moment. It may be beneficial to continually track the latest Visual Studio project version and increase the .NET Framework version to the highest compatible level, if builds are then depending on tests that run in .NET. I think that the XUnit console runner needed 4.5.2, otherwise it forces the environment to have a mass of extra Nuget packages. |
Well like I said unit tests to begin with, which excludes click automation, UI tests are on the completely opposite end of the test pyramid spectrum. On unit test level it's still useful to simulate click events, which mocking frameworks like NSubstitute is able to do |
Fixed in #1040 |
I think we should add projects that allow writing tests for the editor.
The text was updated successfully, but these errors were encountered: