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

Add Functional Tests #131

Open
stuaroo opened this issue Mar 8, 2021 · 3 comments
Open

Add Functional Tests #131

stuaroo opened this issue Mar 8, 2021 · 3 comments

Comments

@stuaroo
Copy link
Member

stuaroo commented Mar 8, 2021

@MGatner Looking back, this repo has had a few issues raised for missing images. I was thinking that it might be a good idea to add some basic functional tests for issues we've experienced before, and these could be automated via Github Actions. I've started writing some basic checks, but wanted to get your feel on this (since you've had the most activity here lately and this would affect you the most).

Also do you have any specific tests you would like to see? My plan was to start with: icons in 'talents' json exist in images/talents/, icons in 'abilities' json exist in images/talents/, hero icons exist in images/heroes/, and hero json files exist for all heroes in readme (and vice versa). I also don't know what I'm doing with Github Actions, but this seems like a straightforward enough task to learn by doing!

@MGatner
Copy link
Member

MGatner commented Mar 9, 2021

I think that's a great idea! Have fun with it and let me know if you need any help - I do a lot with GitHub Actions and unit testing.

@stuaroo
Copy link
Member Author

stuaroo commented Mar 9, 2021

Great! I noticed the actions you've set up on the php sdk and it inspired me to give it a try, so I'll definitely bug you if I get stuck on anything.

One thing I was trying to figure out: it seems like I'll need to have the tests added as part of the code base so the normal action cycle of checkout code, setup environment, run tests can happen. Is that the preferred way to do it? Originally I thought there'd be a way to define tests outside of the repo (like at the meta level of the repo), but I haven't seen a way to do that. Though I guess this repo is a little different since it's mostly data and light on code compared to a typical repository, so maybe that's not a typical concern.

Also, for organizational purposes, should I add a tests folder or just include the test file at the root level?

@MGatner
Copy link
Member

MGatner commented Mar 9, 2021

There's not a "wrong way" to do it, but typically your source code would all live in a sub folder (like src), all your repo specifics would be in the root, and then tests would have their own tests folder. Since we have an established structure that people expect I don't think we should move anything around, so I like your idea of just creating a new tests folder and putting everything in there.

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