MDK-SE icon indicating copy to clipboard operation
MDK-SE copied to clipboard

Missing documentation around .debug.cs features?

Open Sergeus opened this issue 4 years ago • 5 comments

New MDK user here - love the suite of tools, it's exactly what I was looking for in an SE scripting environment!

I'm unable to find documentation in the Wiki about the .debug.cs features that seem to be a part of MDK. Is there a page describing how it works and what it's for?

Reading between the lines, I get the impression that one could use MDKFactory in order to run a simulated version of your SE scripts outside the actual Space Engineers game. So I could effectively write automated tests for my scripts - try out logic etc without needing to start up the game each time? (That would be a huge help in finding simple logic errors!)

Does the MDK assembly provide any sample testing/mock types for the SE block interfaces to allow tests to simulate how the program will interact with other blocks?

Sergeus avatar Jun 07 '20 16:06 Sergeus

Yeah it's kinda a hidden feature 😄 All .debug.cs files are simply ignored during publish. That's all there is to it.

And no. There are no samples for the testing/mock types. Sorry. It's simply about simulating what the game should do. I would recommend reading up on unit test mockups, because that's what you need. Cheats 😉

malware-dev avatar Jun 07 '20 17:06 malware-dev

Awesome, I'm familiar with unit test mocks, just didn't want to run off implementing my own or integrating a mocking framework if there were some already there! No problem that they're not there already, this project is already way more comprehensive than I ever expected!

After I've had a while to play around with it, would you be interested in me sending a pull request for a doc or two around using the .debug.cs files, to show people how to use them to test outside SE? As you've said, the actual functionality of ignoring .debug.cs files is very simple, it could just be handy to have a doc or two to point people toward the patterns that it enables!

Sergeus avatar Jun 07 '20 18:06 Sergeus

Oo, I see your other repo, MDK-Mockups, is sort of what I'm looking for, I'll do some digging there.

Sergeus avatar Jun 07 '20 18:06 Sergeus

Eh; "mine" in that it happens to be on my repo 😛 It belongs more to @kwilliams1987 than me, really

malware-dev avatar Jun 07 '20 18:06 malware-dev

I should do more work on it, I've been kinda bogged down with my real work recently. :(

kwilliams1987 avatar Jun 08 '20 06:06 kwilliams1987