A ruby gem for web application testing. Please see .NET version.
- Manages test cases in CSV file like this.
- HTTP request conditions to get test documents (Uri, Method, UseAgent, QueryString, PathInfos, Header, Cookie)
- Test cases and Assert conditions
- Verifies HTTP response information.
- HTTP response header, cookies, status code, URL
- Document structure (HTML, XML, JSON and Other text format)
- Can be integrated in major test frameworks and CI.
- RSpec, Test::Unit, Cucumber, Jenkins etc.
Tatami enables you to reduce test codes and help review for test cases.
This library covers the following test types.
- Integration Test
- Acceptance Test
- Smoke Test
- (not for Unit Test)
Tatami provides the following test functions.
- Manage HTTP request information, test cases and assert conditions in CSV.
- Get expected and actual documents (such as HTML, XML, JSON and Other formats).
- Test HTTP response information (Uri, Status Code, Header, Cookie, Format using XSD).
- Test response documents using expected values, XPath and regular expression.
- Provide failed information.
Test the HTML structure of the "United States" Wikipedia article by expecting static values.
- This scenario covers to test between html values and static values in CSV.
- See Wikipedia page test for details.
Test the HTML structure of the "New York" Wikipedia article by expecting values from Web APIs (Yahoo Weather RSS).
- Recent Web applications consume data created by Web APIs instead of databases. This scenario will test that particular values that are present in an XML Web API exist in a separate HTML interface.
- See Yahoo Weather page test for details.
- Test Web API which returns XML/JSON using static values.
- See Yahoo API test for details.
See CSV implementation for details.
See BaseUriMapping.xml settings for details.
See UserAgentMapping.xml settings for details.
-
Create a test project.
-
Add this line to your application's Gemfile.
gem 'tatami', :git => 'https://github.com/kenyamat/tatami.git'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tatami
-
Create a BaseUriMapping.xml
- See more details : BaseUriMapping.xml settings
-
Create a UserAgentMapping.xml
- See more details : UserAgentMapping.xml settings
-
Create a CSV file including test cases.
-
Create a test method.
-
Run test.
- "bundler", "~> 1.7"
- "rake", "~> 10.0"
- 'nokogiri', '~> 1.6'
- 'builder'
- 'activesupport'
- 'httpclient', '~> 2.5'
- 'csv_parser', '~> 0.0.1', :git => 'https://github.com/kenyamat/csv_parser.git'
- 'rspec', '~> 3.1'
Copyright (c) 2014 kenyamat. Licensed under MIT.