Description
API of unittest very similar to unittest of Python
Unittest alternatives and similar packages
Based on the "Testing" category.
Alternatively, view Unittest alternatives based on common mentions on social networks and blogs.
-
proper
PropEr: a QuickCheck-inspired property-based testing tool for Erlang -
bypass
Bypass provides a quick way to create a custom plug that can be put in place instead of an actual HTTP server to return prebaked responses to client requests. -
ExVCR
HTTP request/response recording library for elixir, inspired by VCR. -
StreamData
Data generation and property-based testing for Elixir. ๐ฎ -
amrita
A polite, well mannered and thoroughly upstanding testing framework for Elixir -
power_assert
Power Assert in Elixir. Shows evaluation results each expression. -
shouldi
Elixir testing libraries with nested contexts, superior readability, and ease of use -
katt
KATT (Klarna API Testing Tool) is an HTTP-based API testing tool for Erlang. -
Stubr
Stubr is a set of functions helping people to create stubs and spies in Elixir. -
FakeServer
FakeServer integrates with ExUnit to make external APIs testing simpler -
mecks_unit
A simple Elixir package to elegantly mock module functions within (asynchronous) ExUnit tests using Erlang's :meck library -
mix_test_interactive
Interactive watch mode for Elixir's mix test. https://hexdocs.pm/mix_test_interactive/ -
test_selector
Elixir library to help selecting the right elements in your tests. -
factory_girl_elixir
Minimal implementation of Ruby's factory_girl in Elixir. -
toxiproxy_ex
ToxiproxyEx is an Elixir API client for the resilience testing tool Toxiproxy. -
ex_parameterized
This library support parameterized test with test_with_params macro. -
cobertura_cover
Output test coverage information in Cobertura-compatible format -
ex_unit_fixtures
A library for defining modular dependencies (fixtures) for ExUnit tests. -
ElixirMock
Creates clean, concurrent, inspectable mocks from elixir modules
Elixir and Phoenix Application Security Platform
Do you think we are missing an alternative of Unittest or a related project?
README
Unittest
Unittest is a unit testing library for Elixir was originally inspired by Python standard testing framework. This is a port of unittest Python library for Elixir. It supports test automation, sharing of setup and shutdown code for tests, aggregation of tests into collections.
API of unittest
very similar to unittest
of Python. Below you can see examples.
Python:
def test_equal(self):
self.assertEqual(22, 23-1)
def test_is(self):
self.assertIsInstance("string", str)
self.assertIsInstance(True, bool)
self.assertIsInstance(["one", "two"], list)
Elixir:
test "equal" do
assert equal(22, 23-1)
end
test "is" do
assert is("string", :str)
assert is(true, :bool)
assert is([:one, :two], :list)
end
Installation
Just add :unittest
to deps:
def deps do
[{:unittest, "~> 0.1.0"}]
end
and run deps.get
:
โ mix deps.get
Atention
This is an experimental project and it's mean that we do not guarantee stability.
License
Unittest is licensed under the MIT License. See LICENSE for more information.
*Note that all licence references and agreements mentioned in the Unittest README section above
are relevant to that project's source code only.