hspec-server: Test Framework for checking server's status

[ bsd3, library, testing ] [ Propose Tags ] [ Report a vulnerability ]

Hspec-Server is test framework for checking server's status. It is inspired by the Ruby library ServerSpec.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.2.0, 0.2.1, 0.2.2, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.4.1
Change log ChangeLog.md
Dependencies base (>=4.6 && <5), containers, hspec (>=2), hspec-core (>=2), hspec-expectations, HUnit, process, regex-posix, temporary, transformers [details]
License BSD-3-Clause
Author Junji Hashimoto
Maintainer junji.hashimoto@gmail.com
Category Testing
Bug tracker https://github.com/junjihashimoto/hspec-server/issues
Source repo head: git clone https://github.com/junjihashimoto/hspec-server.git
Uploaded by junjihashimoto at 2015-02-16T11:15:49Z
Distributions NixOS:0.4.1
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 5904 total (26 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-02-16 [all 1 reports]

Readme for hspec-server-0.4.1

[back to package description]

Hspec-Server: Test Framework like ServerSpec for Haskell

Hackage version Build Status Coverage Status

Hspec-Server is test framework for checking server's status. It is inspired by the Ruby library ServerSpec.

Getting started

Install this from Hackage.

cabal update && cabal install hspec-server

Usage

Put "with(ServerType)" after hspec's describe-sentence. Currently localhost, ssh , vagrant and docker(>=1.4.1) are supported for ServerType. Examples are below. "@>=" is like hspec's shouldBe. it can check multiple values.

    describe "test for localhost" $ with localhost $ do
      it "package zookeepr" $ do
        package "zookeeper" @>= installed
      it "port test" $ do
        port 2181 @>= listening
      it "service test" $ do
        service "cron" @>= running
      it "command test" $ do
        command "echo" ["hoge"] [] @>=  exit 0 <> stdout "hoge\n"
    describe "test for vagrant" $ with (vagrant "servername") $ do
      it "port test" $ do
        port 2181 @>= listening
    describe "test for docker" $ with (docker "containerId") $ do
      it "port test" $ do
        port 2181 @>= listening