Git Product home page Git Product logo

testtemplate's Introduction

testTemplate

What is this

  • DB操作のあるプログラムのテストに使われるdbUnit(http://dbunit.sourceforge.net/) を容易に準備できるテンプレート
  • Seleniumのテストも支援

Contains

util.RuleResource

  • application.propertiesに記載した情報を参照するためのクラス。
  • @ClassRuleを指定して使用

util.RuleDataBase

  • dbUnit周りの操作を行うクラス
  • @ClassRuleを指定して使用&util.RuleResourceが必須
  • テストの開始時に任意のテーブルのバックアップを行い、終了時にリストアを行う

util.selenium.RuleTestUtil

  • SeleniumのjUnitテストを実施する際に使用すると吉なクラス
  • @Ruleを指定して使用

util.selenium.LocalStorageJS

  • SeleniumのjUnitテスト実施時にLocalStorageを操作するためのクラス

Getting Started

GitHubからclone

  1. git clone https://github.com/rk7fd3s/testTemplate.git

テスト実行

  1. cd testTemplate
  2. ./mvnw test * if your env is windows then mvnw.cmd test
  • 最終的に、Tests run: 2, Failures: 0, Errors: 0, Skipped: 0と、BUILD SUCCESSが表示されればOK。

テスト内容

  • TestRuleResource
  • 設定ファイルapplication.propertiesの内容が正しく取得できているかのテスト
  • TestRuleDataBase
  • DB操作を行ったあと、テーブル情報が想定される変更であるかのテスト

Eclipseへの取り込み

  1. 「Gitリポジトリの複製」または、「Gitリポジトリの追加」(ローカルに既DLの場合)を行い、Eclipseにgit管理フォルダを認識させる
  2. 当該Gitリポジトリから「プロジェクトのインポート」を選択
  3. 「一般的なプロジェクトとしてインポート」を選択
  4. パッケージ・エクスプローラーなどで見れるようになったら、右クリックで「構成」-「Mavenプロジェクトへ変換」を選択
  5. 「実行」-「Maven test」などを試してみる

testtemplate's People

Stargazers

 avatar

Watchers

 avatar  avatar

testtemplate's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.