Coder Social home page Coder Social logo

kemsakurai / gas-combinationtestcasegenerator Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 1.0 942 KB

Google スプレッドシート で、組合せテストケースを生成するためのコンテナバインドスクリプト

License: MIT License

JavaScript 6.60% TypeScript 93.40%
google-apps-script google-spreadsheet allpairs testing-tools pairwise clasp typescript

gas-combinationtestcasegenerator's Introduction

gas-CombinationTestCaseGenerator

Google スプレッドシートで、組み合わせテストケースの生成をする。コンテナバインドスクリプトです。


生成できる組み合わせテストケースについて

以下のテストケースの生成が可能です。

  • 全網羅テスト

  • ワンワイズ

  • ペアワイズ

全網羅と、ワンワイズ テストの生成、ペアワイズ テストの生成が可能です。


使い方

以下、使い方について記載します。

  1. コンテナバインドスクリプトのデプロイ方法

  2. スプレッドシートのメニューの説明

  3. テストケース生成


1. コンテナバインドスクリプトのデプロイ方法

clasp のインストール

コンテナバインドスクリプトをデプロイするため、clasp をインストールする必要があります。

  • clasp のインストール
npm i @google/clasp -g    
  • clasp login
clasp login    

使用しているGoogle アカウントに対して、clasp から Google Apps Script ののプロジェクトの作成と更新Google Apps Script のデプロイの作成と更新 を許可する必要があります。

Script の デプロイ

  • git repository を cloneします。
git clone https://github.com/kemsakurai/gas-CombinationTestCaseGenerator.git <project_name>   
  • npm install
cd <project_name>
npm install  
  • スプレッドシート を作成する場合
    スプレッドシート を新規で作成する場合は、npm run setup を実行します。
    .clasp.json の初期化、スプレッドシート を作成します。

  • 既存のスプレッドシート を使う場合
    以下、既存のスプレッドシートを使用する場合の手順を記載します。

    • setup:use-id コマンドを実行する
      既に存在する scriptId を使用して、以下のコマンドを実行します。
    npm run setup:use-id 1K7MPtCHkjasdf93238234asdKFDF3sa9
    • .clasp.json の スクリプトIDを変更する
      .clasp.json の scriptId を、デプロイ先のコンテナバインドスクリプトのscriptIdに変更します。
    {"scriptId":"<your_script_id>", "rootDir": "dist" }
    • 補足.コンテナバインドスクリプトのscriptIdの入手方法
      1. デプロイ先のスプレッドシート を作成し、メニューのツールから、スクリプトエディタを開きます。
      2. スクリプトエディタのファイルから、プロジェクトのプロパティを選択します。
        Image from Gyazo
      3. ダイアログに表示されるスクリプトIDをコピー、ペーストします。
        Image from Gyazo

dist ディレクトリ配下のスクリプトのコピー、ペースト

clasp、npm の環境構築が面倒な場合、dist配下の、bundle.js と、appsscript.json をスクリプトエディタからコピー、ペーストすることで登録できます。


2. スプレッドシートのメニューの説明

コンテナバインドスクリプトを、デプロイすると、スプレッドシートに以下のメニューが追加されます。
2019-11-30 15.23.15.png - Google ドライブ


Settings

Image from Gyazo

  • Create Factor&Level Sheet
    因子と水準を記録するシートを作成します。

Create test case

2019-11-30 15.23.38.png - Google ドライブ

  • Create all combination test case
    全網羅組み合わせテストを生成します。

  • Create one-wise test case
    one-wise テストケースを生成します。

  • Create pair-wise test case
    pair-wise テストケースを生成します。


ペアワイズ テストのライブラリについて

walkframe/covertable: It makes combinations covering pairs for pairwise testing. を使用しています。
設定オプションは以下の通りです。

import { default as make, sorters } from '../libs/covertable/index';
export const pairWise = (values): any => {
  return make(values, {
    // optional
    length: 2, // default: 2
    sorter: sorters.greedy, // default: sorters.sequential
    sortArgs: {} // default: {}
  });
};

ライセンス

MIT

gas-combinationtestcasegenerator's People

Contributors

kemsakurai avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.