Skip to content

Instantly share code, notes, and snippets.

Created February 18, 2016 04:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sharathkumar3011/70d393fc35063ce06574 to your computer and use it in GitHub Desktop.
Save sharathkumar3011/70d393fc35063ce06574 to your computer and use it in GitHub Desktop.
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config
# Configures the endpoint
config :hello_phoenix, HelloPhoenix.Endpoint,
url: [host: "localhost"],
root: Path.dirname(__DIR__),
secret_key_base: "ur8yC0kQtT36WAwO/uORZTkCMRcnJ9UZMSHDgaLYnpkFHBy86a/8x2TeO7Lb4bga",
render_errors: [accepts: ~w(html json)],
pubsub: [name: HelloPhoenix.PubSub,
adapter: Phoenix.PubSub.PG2]
# Configures Elixir's Logger
config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id]
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env}.exs"
# Configure phoenix generators
config :phoenix, :generators,
migration: true,
binary_id: false
#config :hound, driver: "phantomjs"
config :hound, driver: "selenium"
config :hound, browser: "firefox"
# Start with default driver at port 4444 and use firefox
#config :hound, port: 4444, browser: "firefox"
# Define your application's host and port (defaults to "http://localhost:4001")
config :hound, app_host: "http://localhost", app_port: 4000
defmodule HelloPhoenix.SampleTest do
use HelloPhoenix.ConnCase
# Import Hound helpers
use Hound.Helpers
# Start a Hound session
IO.puts "sample test"
test "GET /" do
navigate_to "/"
assert page_source =~ "Welcome to Phoenix"
IO.puts "after test block"
Copy link

igorffs commented Feb 18, 2016

  • Can you add your ConnCase?
  • Check if your test_helper.exs already has ExUnit.start and remove it from your test file
  • Keep just one hound config, if you need to incluse other options just add it for the single config:
# Try just `config :hound, driver: "selenium"` first
config :hound, driver: "selenium", browser: "firefox"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment