-
February 21st, 2021, 21:53 #1
- Join Date
- Mar 2020
- Posts
- 43
FG Test - Automated Tests for Extensions and Rulesets
This extension is for extension and ruleset developers. It enables TDD (Test Driven Development) and BDD (Behaviour Driven Development).
A longer description and brief tutorial can be found on the github page here: https://github.com/zymsys/fg-test
This 0.2 release adds a FG compatible promises library. It makes writing tests for async functions reasonably easy.
I'm still fairly new to Lua and extension coding, so I'd appreciate any feedback, good or bad.Last edited by Vam; February 27th, 2021 at 18:48. Reason: Version 0.2
-
February 27th, 2021, 18:52 #2
- Join Date
- Mar 2020
- Posts
- 43
I just released version 0.2. This version includes a promises library that can be used to simplify async code. Some examples and an explanation are provided on the github page.
I'd appreciate hearing from you if you've tried to use this, even if it didn't go well. My next step will be to use it in my work on ChatBat, and I expect I'll find some things to improve / fix while I'm using it.
-
March 26th, 2021, 00:51 #3
- Join Date
- Jun 2018
- Location
- Richardson, TX
- Posts
- 71
I plan on getting into writing fg extensions...and I'll use your extension. I'm also new to Lua...but have over 25+ years of programming exp. and look forward to being able to write unit-tests for my code.
-
March 26th, 2021, 13:05 #4
- Join Date
- Mar 2020
- Posts
- 43
Great, let me know how it goes. I found a bug last weekend and just pushed the fix for it to github for you now. Let me know if you find any other issues. I'm working on some library routines for the behavioural tests that I think will have a lot of use outside of fg-test, starting with a character builder.
-
April 7th, 2021, 19:39 #5
- Join Date
- Mar 2020
- Posts
- 31
It's great to have access to some tests when working with FG
One request from me would be to have way to specify functions that are executed:
On setup of Test Suite.
Before Each Test.
After Each Test.
After Test Suite is finished.
Why? I am working on extension that adds/changes/removes some data to DB and way to automatically do set up and cleanup would be very helpful.
-
April 7th, 2021, 20:00 #6
- Join Date
- Mar 2020
- Posts
- 43
Yes, great idea. All of the more mature test harnesses have this and it shouldn't be too hard to add. I've had very little free time to work on this, but I'll put that on the to do list. I'm also open to PRs!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks