[IntelMQ-dev] Advice for setting up tests for bot chains

L. Aaron Kaplan aaron at lo-res.org
Fri Feb 19 12:32:42 CET 2021


Hi Mika,

this is an old idea which I discussed with Sebastian in ~ 2014 (?) or 2015 already.
Somehow it never got implemented. But I agree, it's really important to test correctness.

I think what you would need to do is the following:

1) define a pipeline which has as collector some file collectors.
The input shall come via a file
2) define the run parameters for this
3) define filters (filter out certain fields from the events before storing)
4) store the results of the flow into a known output file (file output bot)
5) compare these output file with known good output files.
6) return error on diff

I would say we could call this a "unit-test-flow"

I think this could be easily implemented as a script / docker image which gets deployed via CI/CD.

Gitlab supports this approach. I guess gitHUB supports it as well.

How about writing a small proposal for this together?
Then we can put this proposal in an issue and see that it gets implemented.


Best,
a.


> On 19.02.2021, at 12:25, Mika Silander <mika.silander at csc.fi> wrote:
> 
> Hi,
> 
> While writing tests to individual bots seems quite straightforward, what would be the recommended way for writing (unit?) tests for a chain of bots? Ideally, I'd like to feed in individual test events to the first bot and only check what is returned by the last bot (event or whatever the expected outcome should be).
> 
> I suppose there are many bad and clumsy ways of doing this so that's why I air this question on the dev list.
> 
> Thanks for all help in advance, Mika
> _______________________________________________
> IntelMQ-dev mailing list
> IntelMQ-dev at lists.cert.at
> https://lists.cert.at/cgi-bin/mailman/listinfo/intelmq-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.cert.at/pipermail/intelmq-dev/attachments/20210219/5d53f8c0/attachment.sig>


More information about the IntelMQ-dev mailing list