suransys / omnistap

Unit testing framework for Omnis Studio
MIT License
15 stars 7 forks source link

Added click to calling method and increased the length for the librar… #17

Closed martenverhoeven closed 1 year ago

martenverhoeven commented 1 year ago

…ies droplist

For every assertion, the calling method will be stored and clicking on the assertion line in the Results tab will jump straight to the calling method line, so you can quickly start debugging by setting a breakpoint there.

barkingfoodog commented 1 year ago

@martenverhoeven thank you for the enhancement! It looks like this co-mingles upgrading to Studio 10.2. In a perfect world we'd commit those separately, but Omnis changes so many files it would be a nightmare to separate. I'll go ahead and merge this. Thanks!

martenverhoeven commented 1 year ago

Hi Alex,

Yes, this has a lot of changes because of the Omnis version. We are trying to move to Git for our own software, but I still use it in a write to git only way (because of issues importing back). So I don’t have a lot of experience with Omnis in Git yet sadly. Omnis often changes a lot of files which don’t match with real code changes at that point in time, and I don’t have a clear method/best practice to deal with this yet. As I have opened the library in 10.2 I don’t have a way to downgrade and I cannot export as an older version. I think it would also mess up the json integrity if I would just commit the files with real changes, because this would mix version numbers and might prevent a proper import. So I opted for committing everything which would allow you to copy just the lines which are relevant if you find the small changes interesting.

Just as a side note: with this testing framework, lots of reading and experimenting, I am finally starting to see how I could really benefit from automated testing without it being a resource drain. So thanks for putting this library on github (and doing the presentation at Euromnis!)

With kind regards,

Marten Verhoeven

Van: Alex Clay @. Verzonden: Friday 31 March 2023 21:50 Aan: suransys/omnistap @.> CC: Marten Verhoeven @.>; Mention @.> Onderwerp: Re: [suransys/omnistap] Added click to calling method and increased the length for the librar… (PR #17)

@martenverhoevenhttps://github.com/martenverhoeven thank you for the enhancement! It looks like this co-mingles upgrading to Studio 10.2. In a perfect world we'd commit those separately, but Omnis changes so many files it would be a nightmare to separate. I'll go ahead and merge this. Thanks!

— Reply to this email directly, view it on GitHubhttps://github.com/suransys/omnistap/pull/17#issuecomment-1492513762, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFFIJGODXJL23A5XUURBIT3W64YPVANCNFSM6AAAAAAV3UTRPM. You are receiving this because you were mentioned.Message ID: @.**@.>>

barkingfoodog commented 1 year ago

Hi Marten,

You are very welcome! Seriously—no worries on the code changes. You made the right call to just take the 10.2 update along with your enhancements.

Any chance you'll be able to make it to EurOmnis 2023? I'll be presenting OmnisTAP there and would love your input on how it's working for you.

Alex

martenverhoeven commented 1 year ago

Hi Alex,

This might be something Omnis needs to change: to put the version only in the library.json. They probably added the version to every class so they can make sure on every import that this is checked, but that makes sharing parts of code more difficult. Failing on import has the same effect, which is what all other languages do: if your code does not match the version, you get a compile or run error.

They could even make this a library setting, which you could enable on open source libraries, because that is where you will see this issue often.

And yes, I intend to go to Euromnis, so I hope to speak to you there. I am still learning how to best do testing (making resilient tests with the least amount of effort/code). I now mostly use a database stub/fake and prevent using mocks, but sometimes I use them to. So I don’t know everything about the mocking options in omnistap yet.

Regards,

Marten Verhoeven

barkingfoodog commented 1 year ago

Hi Marten,

I completely agree, but as long as Omnis sees this as an export, these files will be messy.

If Omnis actually used text files to story library code, then this would be less of an issue. We wouldn't track a $moddate but just check the file info on the OS. The version would be a single project definition like you suggest. This is what Xcode does for its projects by checking a file with complier settings. The file is messy, but the dev GUI presents it well and it means one file for source control.

Pipe dream, but maybe we'll be there some day.

I'm excited to see you at EurOmnis again! It will be great to catch up and hear how the automated testing lifestyle is going! :)

Let me know if you want a run-through on mocking before then. I'm happy to jump on a Zoom and walk through it with you.

Alex