markdown_test alternatives and similar packages
Based on the "Testing" category.
Alternatively, view markdown_test alternatives based on common mentions on social networks and blogs.
-
hound
Elixir library for writing integration tests and browser automation -
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. -
StreamData
Data generation and property-based testing for Elixir. ๐ฎ -
ExVCR
HTTP request/response recording library for elixir, inspired by VCR. -
excheck
Property-based testing library for Elixir (QuickCheck style). -
amrita
A polite, well mannered and thoroughly upstanding testing framework for Elixir -
ponos
ponos is a simple yet powerful load generator written in erlang -
power_assert
Power Assert in Elixir. Shows evaluation results each expression. -
shouldi
Elixir testing libraries with nested contexts, superior readability, and ease of use -
FakerElixir
[unmaintained] FakerElixir generates fake data for you. -
katt
KATT (Klarna API Testing Tool) is an HTTP-based API testing tool for Erlang. -
FakeServer
FakeServer integrates with ExUnit to make external APIs testing simpler -
Stubr
Stubr is a set of functions helping people to create stubs and spies in Elixir. -
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. -
mix_erlang_tasks
Common tasks for Erlang projects that use Mix -
cobertura_cover
Output test coverage information in Cobertura-compatible format -
ex_unit_fixtures
A library for defining modular dependencies (fixtures) for ExUnit tests.
Static code analysis for 29 languages.
Do you think we are missing an alternative of markdown_test or a related project?
Popular Comparisons
README
MarkdownTest
Test the Elixir code in your markdown!
Usage
Add :markdown_test
as a dependency in your mix.exs
file:
# mix.exs
defp deps do
[
{:markdown_test, "0.1.2", only: :test}
]
end
In any test module, use MarkdownTest
to pull in the test_markdown/1
macro and call it for your markdown file:
defmodule MyLibraryTest do
use MarkdownTest
test_markdown("README.md")
end
Then add some Elixir code to test in your markdown file.
The format roughly resembles that of a doctest
.
In order to be picked up, a code block must be between the following markdown comment tags:
<!--- MARKDOWN_TEST_START -->
...code
<!--- MARKDOWN_TEST_END -->
.
Examples
<!--- MARKDOWN_TEST_START -->
iex> 1 + 2
3
<!--- MARKDOWN_TEST_END -->
The expression and expected values can span multiple lines:
<!--- MARKDOWN_TEST_START -->
iex> a = %{cool: :beans}
...> b = %{beans: :cool}
...> Map.merge(a, b)
%{
cool: :beans,
beans: :cool
}
<!--- MARKDOWN_TEST_END -->
You can also include any setup code that needs to be run prior to testing the code:
<!--- MARKDOWN_TEST_START -->
defmodule MyModule do
def add(x, y), do: x + y
end
iex> MyModule.add(1, 2)
3
<!--- MARKDOWN_TEST_END -->
markdown_test
will assert that the expression and the expected value match according to Elixir's pattern matching.
Therefore, you can write a test like this:
<!--- MARKDOWN_TEST_START -->
defmodule MyModule do
def big_result do
{:ok, List.duplicate("hey", 1000)}
end
end
iex> MyModule.big_result()
{:ok, ["hey" | _]}
<!--- MARKDOWN_TEST_END -->
If you don't add any assertion code, markdown_test
will just verify that the code snippet compiles, like:
<!--- MARKDOWN_TEST_START -->
%{
this: %{
"should" => :compile
}
}
<!--- MARKDOWN_TEST_END -->