Skip to content
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

Unit testing #429

Open
WarrenFerrell opened this issue Jul 29, 2020 · 1 comment
Open

Unit testing #429

WarrenFerrell opened this issue Jul 29, 2020 · 1 comment

Comments

@WarrenFerrell
Copy link

Has any work been done on adding unit testing? http://lua-users.org/wiki/UnitTesting I might consider adding some (gearswap is my biggest blocker to switching to v5) but wanted to make sure no one had figured out that it's a bad idea for some reason.

@z16
Copy link
Member

z16 commented Jul 29, 2020

Unit testing works in very limited ways for FFXI, since much of the code base relies on game code, so it's not easy writing testing suites for it. And even mocking often doesn't help, because we don't really know precisely how the game works in many cases, so when the test fails for an edge case, the test itself is almost as likely to be broken as the code, and researching those edge cases is quite a bit of effort. Not to mention that it may change on every update on SE's whims.

That said, for the places where it does apply we have often considered unit tests, and I have already written some for parts of our libraries that do not rely on the game interface (such as the enumerable lib, and related set and list libs), but I have not published them yet, I only use them locally to test changes, since I'm the only one who usually works on those libraries :)

We have even considered tying unit tests into our CI chain, but again, since that is run on a remote server with access to the base game, much of our code is not well suited to such tests. I also started working on a full-scale integrated test suite, but it comes with a bunch of its own issues and drawbacks.

All said, we do like the idea and have discussed it a few times internally as well. If you're up for helping with this, feel free to join us on Discord to discuss options.

[Side note: An inital version of GS is available on my personal package branch. It is very much a beta, and has some to-do items, as noted in this issue, but is otherwise usable, and could definitely use some eyes on it to test it out.]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants