-
Notifications
You must be signed in to change notification settings - Fork 16
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 integration tests #23
Comments
How does this relate to jest in #42? |
The testing framework is out of the way now. This just has the 1 task left, which is to either:
|
Can you share an estimate of work for 1? |
Breaking 1 down:
Step 1 could take me a few hours of analyzing the data and engine dry-run output. |
Can we do this via one of the tools at
https://towardsdatascience.com/free-resources-for-generating-realistic-fake-data-da63836be1a8
In particular I’d like to see a tool that can read our prod exports and
spit out a deterministic output which could be added to the repo and tested
using gh actions on PRs
…On Mon, Nov 15, 2021 at 10:17 PM Steven Degutis ***@***.***> wrote:
Breaking 1 down:
1. Write up maybe 10 scenarios for license/transaction patterns and
how the engine should act on them
1. What contacts should be generated/updated?
2. What deals should be generated/updated?
3. What contacts/companies should be associated with the deals?
4. Add some variations for when deals exist and are in various
states.
5. Add some variations with different partner / mass-provider
domains.
2. Run them by you and adjust as needed
3. Turn them into tests
Step 1 could take me a few hours of analyzing the data and engine dry-run
output.
Step 2 is async so it's hard to estimate.
Step 3 could also take a few hours.
So overall probably a day, possibly 2.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABAP7P7SV45QGA2OUIWOQ7TUMHELJANCNFSM5C52XK7A>
.
|
Those don't help much. Each test should have 4 levels of data:
Some of the tools here (and other similar tools) are okay at generating data for level 3, but we have to do just as much work at feeding them schema info (if not more) as we would if we just wrote fake-data generators ourselves. |
That said, the engine has a detailed-log-level that outputs extremely helpful structure of MPAC records, engine events, and engine actions. Here's a real example with redactions:
Pulling sample scenarios from the logs when running on real data, and then feeding them into a script that auto-redacts info, should get us sample data pretty easily for levels 2 and 3. |
Regarding GH actions and PRs, we can pretty easily set the repo up to run |
A good portion of the work for data-levels 2 and 3 is now done in #56. Running engine in dev mode now saves all intermediate engine data in a similar format as above, plus deal actions. The main thing left to make it suitable for creating test cases is redacting IDs, which can be automated pretty easily. We might also want to automate generating test-data directly (in JSON format) instead of in this format, which we'd have to manually turn into tests. |
Just did a few small PRs towards this between other projects over the past few days. We can now generate realistic sample scenarios with fake data, like this (all IDs/amounts are fake):
This shows scenario-centric aspects of the data that the engine is looking at when running its logic. We'll be able to:
So what's next? We actually skim these output files and find good scenarios that we want to turn into tests. Once we find them, we'll need to feed them into a script (which we need to write) that:
I think once those tasks are done, we'll have super good tests 👌💯 |
Just added GH-Action-based CI testing. |
@sdegutis should we merge in #62 and close this? Not sure what the current status is. |
Not yet, I have a bit of work to do to integrate it first, and after that I need to fill in some real-world business cases. |
@sdegutis how is this done with an open task in the description? |
Forgot to toggle it. Oops. |
This will catch things like incorrect logic when creating/uploading deals, which we recently got bit by (e.g. bug created at 1485339 and fixed at c6788ba).
This will involve:
MemoryDownloader
andMemoryUploader
classes for testsThe text was updated successfully, but these errors were encountered: