test_selector alternatives and similar packages
Based on the "Testing" category.
Alternatively, view test_selector 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/ -
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.
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of test_selector or a related project?
README
TestSelector
A set of Elixir and Hound helpers to set/get test selectors to/from elements in a Phoenix app (when Mix.env == :test
). These selectors are hashed (scoped to the view module they are used in) for accurate selection and "leakage" prevention. See our Wiki for examples.
Why? Because we prefer reserving classes for styling, and id's have limitations because they have to be unique.
Dependencies
Installation
def deps do
[{:test_selector, "~> 0.3.1"}]
end
Use TestSelector.HTML.Helpers
to your web.ex.
- In phoenix 1.2.0 at
web/web.ex
- In newer Phoenix versions
lib/your_project/web/web.ex
Add somewhere along:
def view(opts \\ []) do
quote do
...
use Phoenix.HTML
use TestSelector.HTML.Helpers
...
end
end
Testing with Floki
In the tests import the TestSelector.Test.HoundHelpers
:
defmodule Project.Web.MyTest do
...
use Hound.Helpers
import TestSelector.Test.FlokiHelpers
...
end
Testing with Hound
In the tests import the TestSelector.Test.HoundHelpers
defmodule Project.Web.MyTest do
...
use Hound.Helpers
import TestSelector.Test.HoundHelpers
...
end
Tests
To run tests you need to install PhantomJS.
brew install phantomjs
Run the webdriver:
phantomjs -w
Run the tests:
mix test