victorolinasc / junit-formatter

A JUnit XML report exporter for Elixir's ExUnit
https://hexdocs.pm/junit_formatter/
Apache License 2.0
111 stars 37 forks source link

junit-formatter broken on Debian 7 #2

Closed mzemel closed 9 years ago

mzemel commented 9 years ago

I can use this application just fine in my test suite when running an Elixir app on Mac, however when I try to do mix test in a docker container, I get:

Finished in 0.3 seconds (0.2s on load, 0.1s on tests)
13 tests, 0 failures

Randomized with seed 927793
23:30:10.115 [error] GenEvent handler JUnitFormatter installed in #PID<0.241.0> terminating
** (UndefinedFunctionError) undefined function: :xmerl.export_simple/2 (module :xmerl is not available)
    :xmerl.export_simple([{:testsuites, [], [{:testsuite, [errors: 0, failures: 0, name: Gide.AuditControllerTest, tests: 3, time: 87808], [{:testcase, [classname: 'Elixir.Gide.AuditControllerTest', name: 'test shows chosen resource', time: 22210], []}, {:testcase, [classname: 'Elixir.Gide.AuditControllerTest', name: 'test renders page not found when id is nonexistent', time: 25310], []}, {:testcase, [classname: 'Elixir.Gide.AuditControllerTest', name: 'test lists all entries on index', time: 40288], []}]}, {:testsuite, [errors: 0, failures: 0, name: Gide.AuditTest, tests: 2, time: 1207], [{:testcase, [classname: 'Elixir.Gide.AuditTest', name: 'test changeset with valid attributes', time: 598], []}, {:testcase, [classname: 'Elixir.Gide.AuditTest', name: 'test changeset with invalid attributes', time: 609], []}]}, {:testsuite, [errors: 0, failures: 0, name: Kafka.ConsumerTest, tests: 5, time: 51574], [{:testcase, [classname: 'Elixir.Kafka.ConsumerTest', name: 'test doc at Kafka.Consumer.to_error_json/2 (4)', time: 96], []}, {:testcase, [classname: 'Elixir.Kafka.ConsumerTest', name: 'test doc at Kafka.Consumer.to_error_json/2 (5)', time: 12168], []}, {:testcase, [classname: 'Elixir.Kafka.ConsumerTest', name: 'test doc at Kafka.Consumer.to_changeset/1 (2)', time: 37], []}, {:testcase, [classname: 'Elixir.Kafka.ConsumerTest', name: 'test doc at Kafka.Consumer.save/1 (1)', time: 19629], []}, {:testcase, [classname: 'Elixir.Kafka.ConsumerTest', name: 'test doc at Kafka.Consumer.to_changeset/1 (3)', time: 19644], []}]}, {:testsuite, [errors: 0, failures: 0, name: Gide.ErrorViewTest, tests: 3, time: 6063], [{:testcase, [classname: 'Elixir.Gide.ErrorViewTest', name: 'test render 500.html', time: 11], []}, {:testcase, [classname: 'Elixir.Gide.ErrorViewTest', name: 'test render any other', time: 18], []}, {:testcase, [classname: 'Elixir.Gide.ErrorViewTest', name: 'test renders 404.html', time: 6034], []}]}]}], :xmerl_xml)
    lib/formatter.ex:68: JUnitFormatter.handle_event/2
    (stdlib) gen_event.erl:538: :gen_event.server_update/4
    (stdlib) gen_event.erl:520: :gen_event.server_notify/4
    (stdlib) gen_event.erl:261: :gen_event.handle_msg/5
    (stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
mzemel commented 9 years ago

This can be solved with sudo apt-get install erlang-xmerl

cs-victor-nascimento commented 9 years ago

Nice! I will probably add the dependency on xmerl application.

Thanks for reporting!