News for hackers. Stuff that matters.

Show HN: Hercules – Open-Source software testing agent

https://testzeus.com/hercules

Hey HN,

After spending way too many late nights wrestling with brittle test scripts and UIs that seem to change just to spite me, we decided to do something about it. So we built Hercules, an open-source testing agent aiming to make end-to-end testing of modern web applications less of a Herculean task (pun absolutely intended).

P.S.- Paid solutions can cost upwords of $15000 and still struggle with maintenance.

What is Hercules?

Hercules is an AI-powered testing agent that turns simple Gherkin steps into fully automated end-to-end tests, eliminating the need for coding skills. It leverages Large Language Models (LLMs) to reason and perform actions based on test requirements.

Key Features-

- Gherkin In, Results Out: Just provide your tests in Gherkin format, and Hercules executes them automatically, outputting results in JUnit XML and HTML reports. - Free and Open Source: Hercules is released under the AGPL v3 license, allowing anyone to use, modify, and contribute. - Salesforce Ready: Capable of handling intricate UIs, Hercules excels in testing platforms like Salesforce. - No Code Required: Automates Gherkin features without the need for scripting or dealing with selectors. - Multilingual Support: Supports multiple languages out of the box, facilitating global collaboration. - Precisely Accurate: Records execution videos and captures network logs for reliable test results. - No Maintenance: Features auto-healing capabilities to adapt to changes without manual intervention. - CI/CD Ready: Easily integrates into your CI/CD pipeline and can run in Docker containers.

Why is Hercules Different?

Unlike traditional testing tools, Hercules acts as an intelligent agent that can think, reason, and adapt. It's built on a multi-agent architecture, allowing it to plan and execute tasks based on the provided Gherkin steps. Additionally, it comes packed with tool usage like Browsers, or APIs; and users can build/attach external tools too.

Try It Out

The source code and detailed documentation are available on GitHub: [https://github.com/test-zeus-ai/testzeus-hercules](https://g...

To get started:

- Install via PyPI:

  ```bash
  pip install testzeus-hercules
  playwright install --with-deps
  ```
- Or use the Docker image:

  ```bash
  docker pull testzeus/hercules:latest
  ```
We've included sample feature files and a quick-start guide in the README to help you get up and running quickly.

Feedback Welcome-

We'd love to hear your thoughts, experiences, or even horror stories about testing gone wrong. Feel free to open issues on GitHub or join forces on our Discord : https://discord.gg/4fyEMWVD

( 13 comments | 3 points | on HN )
Re:Show HN: Hercules – Open-Source software testing agent by ajith-joseph on Monday November 18, 2024 @11:19AM (#42173868)
This is an exciting development—Hercules seems like a potential game-changer for simplifying E2E testing! As someone who's spent countless hours debugging brittle test scripts, the idea of leveraging LLMs for reasoning and automation feels like the future. A few questions and thoughts:

1) Gherkin Parsing and Execution: How does Hercules handle ambiguous or complex Gherkin steps? For instance, if a test step doesn’t clearly map to a specific UI action, does the agent attempt to infer the intent, or does it request clarification?

2) Auto-Healing Tests: The auto-healing feature sounds incredibly useful. Could you explain how Hercules adapts to changes in the DOM or application logic? Does it rely on LLMs exclusively, or are there fallback mechanisms in place?

3) Salesforce Testing: You mention Salesforce readiness—what specific challenges in Salesforce (like dynamic IDs or Shadow DOMs) does Hercules address?

4) Scaling and CI/CD: How well does Hercules scale for large test suites? Are there any specific limitations to consider when integrating into CI/CD pipelines with high parallelism?

5) Future Plans: Any plans to support non-web-based applications (e.g., mobile or desktop)?

This project looks promising, especially for teams without dedicated QA engineers or those working on fast-evolving platforms. Looking forward to trying it out and seeing the community contributions grow. Kudos to you and the team for making it open-source!

Re:Show HN: Hercules – Open-Source software testing agent by Smilinrobin on Tuesday November 19, 2024 @03:15AM (#42181051)
1 - Yes, thats the whole idea (almost) 2 - LLM based 3 - Understands and acts on multi layered DOM 4 - Its available as a docker container. Plus we offer paid solutions for real large scale deployments 5 - Yes, planning for it. Thanks.
Re:Show HN: Hercules – Open-Source software testing agent by shriyansha on Tuesday November 19, 2024 @03:50AM (#42181283)
Hi Ajith,

Thanks for showing interest!

Here is my best effort to explain what’s happening with the agent, and along the way, I’ll try to answer your questions.

The agent works in two steps: planning and execution.

Planning is essentially the process of converting vague or somewhat shallow and disconnected inputs into a clear instruction set that can be handed over for execution. During development, we realized that converting English directly into an instruction set is a more complex problem for our LLMs at this point, leading to less reliable outputs. To address this, we chose the Gherkin format, which provides structure to the input language. Gherkin focuses on terms like "Given," "When," "Then," and "Should." These words act as high-value clues for the LLMs, resulting in a more coherent instruction set.

Key Points 1) Gherkin Usage: Gherkin is simply a format to assist the planner inside the agent—it’s not enforced as strict syntax. You can write ambiguous statements, and the planner will attempt to resolve them and create the best possible execution plan.

However, if you provide extremely ambiguous statements, the planner might ask for clarification or terminate the execution with a failure condition.

This technology is still in its early stages and will mature with community and customer feedback.

2) Auto-Healing: As the agent reads the page from scratch each time it executes, there are no saved or cached automation steps. It always generates instructions on the fly. Because of this, auto-healing is effectively built-in.

In short, auto-healing is LLM-based feedback. You can refer to the README in our repository, where we explain the process of DOM distillation and credit the reference material.

3) Salesforce Support: We tested multiple scenarios on Salesforce, and the agent was able to handle Salesforce well, with a few exceptions. For instance, in cases of heavy customization where no clear action point exists in the UI (e.g., requiring a user to right-click on a cell and perform some other activity), the DOM distillation process cannot identify the cell effectively.

We are continuously adding more evaluations for Salesforce. At this stage, we’re happy with the results in general. If you have a precise use case, we’d love to understand it better. Feel free to schedule a call, post the use case on our Discord (https://discord.gg/JhSAGhfR55), or create an issue on GitHub.

4) Scaling: Currently, Hercules executes one feature file per run, with all scenarios in the file running sequentially. This is because our research revealed that some users write interdependent scenarios.

For execution across multiple feature files, we can run several containers in parallel. Triggering multiple parallel executions is a DevOps exercise, involving launching containers with different mounts in a cluster or serverless platform.

We also offer this scaling as a paid service—check our pricing page. The agent is free for authoring and running as a single unit, allowing everyone to build awesome solutions around it. However, for large-scale execution, you can contact us.

In terms of stability, we found that execution within a feature file is stable, and running across feature files (as multiple instances) has also worked well in our tests. We’re open to learning more and welcome suggestions from the community and customers.

5) Feature Plans: We’ll update the roadmap soon in the README. Some items are already listed there, but we’d love to see more feature requests on Discord or GitHub so we can prioritize them effectively.

We really appreciate your feedback and are excited about your support!

Re:Show HN: Hercules – Open-Source software testing agent by tacticalglare on Monday November 18, 2024 @12:57PM (#42174976)
What would this need to be compatible with Ollama? I would love to run this with a local LLM!
Re:Show HN: Hercules – Open-Source software testing agent by Smilinrobin on Tuesday November 19, 2024 @03:14AM (#42181041)
You can already try other LLMs. Steps in docs.
Re:Show HN: Hercules – Open-Source software testing agent by shriyansha on Tuesday November 19, 2024 @03:55AM (#42181298)
We tried Gpt-4o, Anthropic haiku, Groq's 8b tool preview, Llama 3.2 8b tool support via Groq and all worked well.

With Ollama in our machines, we didn't get good results maybe because of model limitation on function calling.

We are experimenting with more models and smaller models so that running local with local models becomes possible.

Although if you check the readme and example config file there is a way to give it a try with ollama.

Re:Show HN: Hercules – Open-Source software testing agent by Smilinrobin on Tuesday November 19, 2024 @03:16AM (#42181057)
THanks HackerNews for not letting us update the post. But the Discord link had some bug (yes, we need more testing), so here's the link for joining our Discord server: https://discord.gg/JhSAGhfR55
Re:Show HN: Hercules – Open-Source software testing agent by deepak_heatm on Wednesday November 20, 2024 @12:31PM (#42196255)
Sad.. If ollama has limitations with functional calling, can we try NexusRaven-13B, Functional calling Mistral 7B ?
Re:Show HN: Hercules – Open-Source software testing agent by Smilinrobin on Wednesday November 20, 2024 @03:25PM (#42197764)
In theory , yes we could, but would it yield "good enough" results for a "testing" agent- Probably not. The LLM here is actually not just responsible for tool calling, its also doing other intricate things such as planning the next steps based on the input feature file, and generating the browser/API automation code. In our experiments we found that OpenAI 4o performs best, followed by Haiku or Grok.
Re:Show HN: Hercules – Open-Source software testing agent by shriyansha on Friday November 22, 2024 @09:28AM (#42214088)
Deepak I would suggest give it a try check this https://github.com/test-zeus-ai/testzeus-hercules/blob/main/...

I also suggest that you join our slack group so that we can discuss this in one on one and try to solve this for your case. https://join.slack.com/t/testzeuscommunityhq/shared_invite/z...

Re:Show HN: Hercules – Open-Source software testing agent by dhorthy on Sunday November 24, 2024 @03:29PM (#42230264)
salesforce-ready is an interesting specialization, but makes a ton of sense if you're going after enterprise. Stoked to give this a spin.

lemme know if/when you build the CLI agent that write my gherkin too

Re:Show HN: Hercules – Open-Source software testing agent by shriyansha on Sunday November 24, 2024 @10:24PM (#42232948)
Wow, you read our minds.

Checkout our slack channel, we can discuss these ideas in the forum, I would love you hear about your feedback and experience with the runs.

https://join.slack.com/t/testzeuscommunityhq/shared_invite/z...

Re:Show HN: Hercules – Open-Source software testing agent by Smilinrobin on Tuesday November 26, 2024 @12:18PM (#42247618)
Thanks. Also, while Hercules can do Salesforce, we've also checked it for complicated scenarios on the web (and there's an eval folder too). We'd love to know about your feedback and thoughts.