Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8080945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:34:11+00:00 2026-06-05T16:34:11+00:00

I am working with Erlang and EUnit to do unit tests, and I would

  • 0

I am working with Erlang and EUnit to do unit tests, and I would like to write a test runner to automate the running of my unit tests. The problem is that eunit:test/1 seems to only return “error” or “ok” and not a list of tests and what they returned in terms of what passed or failed.

So is there a way to run tests and get back some form of a data structure of what tests ran and their pass/fail state?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:34:14+00:00Added an answer on June 5, 2026 at 4:34 pm

    If you are using rebar you don’t have to implement your own runner. You can simply run:

    rebar eunit
    

    Rebar will compile and run all tests in the test directory (as well as eunit tests inside your modules). Furthermore, rebar allows you set the same options in the rebar.config as in the shell:

    {eunit_opts, [verbose, {report,{eunit_surefire,[{dir,"."}]}}]}.
    

    You can use these options also in the shell:

    > eunit:test([foo], [verbose, {report,{eunit_surefire,[{dir,"."}]}}]).
    

    See also documentation for verbose option and structured report.

    An alternative option would be to use Common Test instead of Eunit. Common Test comes with a runner (ct_run command) and gives you more flexibility in your test setup but is also a little more complex to use. Common Test lacks on the available macros but produces very comprehensible html reports.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to get a real XSLT processor working with erlang. Which would be
I have a weird problem building a release of an erlang application that I'm
It seems to me from my experimenting with Haskell, Erlang and Scheme that functional
I am working on a decentralized Erlang application. I am currently working on a
Working with an undisclosed API, I found a function that can set the number
Working with H2 I get this error when I try to write a row
I am working on Erlang robotic project. I have made a wallfollower robot program
I'm working through the Erlang documentation, trying to understand the basics of setting up
Is there any working IMAP client library implemented in Erlang which can query IMAP
I'm looking for a good (Or at least working) implementation of OpenID in erlang.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.