The hspec-server package

[Tags:bsd3, library, test]

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


[Skip to Readme]

Properties

Versions 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 BSD3
Author Junji Hashimoto
Maintainer junji.hashimoto@gmail.com
Stability Experimental
Category Testing
Bug tracker https://github.com/junjihashimoto/hspec-server/issues
Source repository head: git clone https://github.com/junjihashimoto/hspec-server.git
Uploaded Mon Feb 16 11:15:49 UTC 2015 by junjihashimoto
Distributions NixOS:0.4.1
Downloads 1190 total (6 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2015-02-16 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for hspec-server

Readme for hspec-server-0.4.1

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