projectdiscovery / nuclei

Nuclei is a fast, customizable vulnerability scanner powered by the global security community and built on a simple YAML-based DSL, enabling collaboration to tackle trending vulnerabilities on the internet. It helps you find vulnerabilities in your applications, APIs, networks, DNS, and cloud configurations.
https://docs.projectdiscovery.io/tools/nuclei
MIT License
20.4k stars 2.49k forks source link

Investigate parallell execution of Integration/Functional tests #5401

Open Mzack9999 opened 3 months ago

Mzack9999 commented 3 months ago

Please describe your feature request:

The task is about investigating parallel execution of Integration/Functional Tests that are now executed sequentially leading to long waiting time. As most of the tests use independent binding ports, it might be worth check if we can group together multiple tests, speeding up the execution of GH actions.

dwisiswant0 commented 2 months ago

I'm not really sure about which part we should focus on for this optimization. Do you think we should do it thru CI? Or the testing itself? AFAIK, testing has something called the T.Parallel method.

Mzack9999 commented 2 months ago

I think it's about the testing logic, if you check for example at cmd/integration-test.main() all the tests are executed sequentially by running nuclei binary and it takes a few minutes. Since the executions appear to be independent from each other (parallel nuclei processes versus a single target shouldn't interfere with each other) maybe we can opt for a sync.WaitGroup with a worker pool and execute a few tests in parallel, cutting down execution time.

dwisiswant0 commented 2 months ago

I'm going to look into this so that we can do the perf/regression testing earlier.