0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Galasaを使ってみた

Last updated at Posted at 2020-08-18

はじめに

Galasaというz/OSをベースとしたハイブリッド・クラウド・アプリケーションのためのテストフレームワークがオープンソースのプロジェクトとして提供されています。これはまだ提供されてから日が浅く(2019年の12月にV0.3.0リリース)、当記事執筆時点(2020年8月)でもV0.10.0というレベルでまだまだこれからという感じのモノなのですが、z/OSのアプリケーションをターゲットにしているというところが魅力的です。しかも、CICS TSの開発拠点でもあるIBM Hursley Lab(UK)で作られているというのが激アツです。ということで、このGalasaを使ってみた時のログです。

Galasa概要

Galasaはz/OSをベースとしたハイブリッド・クラウド・アプリケーションのためのテストフレームワークです。Eclipseのプラグインが提供されていますので、3270アプリやz/OSのバッチアプリなどのテストコードをEclipse上でJUnitライクにJavaで実装しテスト実行を行うことができます。
サンプルのテストコードが提供されていますが、それをチュートリアル的に動かすために、なんとEclipse上で動くホストアプリケーションのシミュレーターのようなものまで提供してくれています。なので、Windows上だけで(z/OSとかz/OSアプリを準備しなくても)、とりあえずこのフレームワーク使ったサンプルを試すことができます。素晴らしい!

環境セットアップ

Windows10上に環境構築してみます。

Eclipseインストール

以下からEclipse IDE for Enterprise Java Developers (Eclipse IDE 2020‑06) のWindows 64bit版をダウンロードします。
Eclipse IDE 2020-06 R Packages

ダウンロードされたzipファイル(eclipse-jee-2020-06-R-win32-x86_64.zip: 約400MB)を適当なディレクトリに解凍します。

Galasa Eclipse Pluginのインストール

参考: Installing the Galasa plug-in

Eclipseを起動し、Help - Install New Software を選択
Work withの欄にhttps://p2.galasa.dev/を指定し、表示されたGalasaのフィーチャーを全て選択してNext
image.png

Next
image.png

Licenseを確認してFinish
image.png

Eclipse再起動
image.png

Eclipseのメインメニューに"Galasa"というメニューが追加されました!
image.png

SimBankセットアップ

Galasaには、SimBankというメインフレームアプリケーションをシミュレートするためのコンポーネント(サンプルのアプリ含む)が提供されています。これはSimPlatformと呼ばれるコンポーネントで動作するらしく、Eclipse上でCICSや3270アプリケーションをシミュレートすることができるようです。
サンプルのテストプロジェクトを実行するときのダミーのホストアプリケーションとして使えますので、まずはそれを動かしてみます。

SimBank構成

Galasa - Setup Galasa Workspace を選択
image.png

consoleに以下のようなメッセージが表示されます。
image.png

ホームディレクトリ下に.galasaというディレクトリが作成され、そこにいくつかファイルが作成されました。全てファイルサイズが0 Byteなので中身はカラです。

C:\Users\TomohiroTaguchi\.galasa>dir
 ドライブ C のボリューム ラベルは Windows です
 ボリューム シリアル番号は 1866-E2FC です

 C:\Users\TomohiroTaguchi\.galasa のディレクトリ

2020/08/15  15:09    <DIR>          .
2020/08/15  15:09    <DIR>          ..
2020/08/15  15:09                 0 bootstrap.properties
2020/08/15  15:09                 0 cps.properties
2020/08/15  15:09                 0 credentials.properties
2020/08/15  15:09                 0 dss.properties
2020/08/15  15:09                 0 overrides.properties
               5 個のファイル                   0 バイト
               2 個のディレクトリ  253,723,049,984 バイトの空き領域

overrides.propertiesを以下のように編集します。

overrides.properties
zos.dse.tag.SIMBANK.imageid=SIMBANK
zos.dse.tag.SIMBANK.clusterid=SIMBANK

simbank.dse.instance.name=SIMBANK
simbank.instance.SIMBANK.zos.image=SIMBANK

zos.image.SIMBANK.ipv4.hostname=127.0.0.1
zos.image.SIMBANK.telnet.port=2023
zos.image.SIMBANK.webnet.port=2080
zos.image.SIMBANK.telnet.tls=false
zos.image.SIMBANK.credentials=SIMBANK

zosmf.server.SIMBANK.images=SIMBANK
zosmf.server.SIMBANK.hostname=127.0.0.1
zosmf.server.SIMBANK.port=2040
zosmf.server.SIMBANK.https=false

credentials.propertiesを以下のように編集します。

credentials.properties
secure.credentials.SIMBANK.username=IBMUSER
secure.credentials.SIMBANK.password=SYS1

SimBank稼働確認

参考: Exploring Galasa SimBank

SimBankはCICSの3270アプリをシミュレートするもののようです。まずテスト対象のアプリがどのように動くものなのかを確認してみます(実際のz/OSが無くてもEclipse上で動きます)。

EclipseのメニューからRun - Run Configurationsを選択
image.png

Galasa SimBankを右クリックしてNew Configurationを選択
image.png

適当に名前を指定してあとはデフォルトのままApply
image.png

Consoleに以下のメッセージが出力され、サンプルアプリが起動しました。
image.png

2023ポートでTN3270を受け付けるようなので、PCOMなどの3270エミュレーターからアクセスしてみます。
image.png

接続できました!

Userid/Passwordに、IBMUSER/SYS1を指定
image.png

BANKTESTというアプリが動いているようなので、PF1を選択
image.png

なんとCICS端末のログイン画面になりました。
image.png

画面クリアして「BANK」というトランザクションを実行します。
image.png

メニューが表示されるので、Browse(PF1)を選択します
image.png

Account Numberに"123456789"を入力してEnter
image.png

指定したAccountの情報が表示されます。
image.png

Account Number "987654321"も確認してみます。
image.png

PF3でメニューに戻って、次はTransfer(PF4)を選択します。
image.png

Account "123456789" => "987654321"へ $1移動させます。
image.png

成功
image.png

再度Browseしてみると一方は$1減って一方は$1増えてます。
image.png
image.png

操作した時のログはEclipseのConsoleに以下のように出力されています。
image.png
(アプリで出しているログかな? JOBLOG or SYSLOG出力っぽい?)

F3を押していくとCICSのログオフまでされて最初の画面に戻ります。

SimBankのテスト

ここからが本題です。サンプルとして提供されるSimBankのテストを行ってみます。テスト用のプロジェクトもサンプルで提供されているのでそれを使います。

サンプルGalasaプロジェクト作成

Eclipseのメニューから File - New - Exampleを選択
image.png

SimBank example projectsを選択してNext
image.png

そのままFinish
image.png

プロジェクトが2つ追加されます。
image.png

dev.galasa.simbank.managerを右クリック Run As - Maven installを選択
image.png

consoleに処理経過が出力されます。依存関係のあるファイルのダウンロードなどが走ります。 BUILD SUCCESSのメッセージが確認できればOKです。
image.png

dev.galasa.simbank.testsも同様にMaven install実行します。

これでサンプルのテストプロジェクトの作成は完了です。
src/main/javaのdev.galasa.simbank.tests以下にテスト用のコードがいくつか提供されていますので、これを実施していきます。
image.png

テスト開始するまえに、先に構成したSimBankを起動しておきます。
(Run - Run Configurations - SimBankを選択してRun)

テスト(1) SimBankIVT

これは上でPCOMから3270ベースのCICSアプリケーション(BANK)を実行する部分をテストするためのコードです。3270端末操作をJavaのテストコードとして記述して実行することができます。

テストコード
SimBankIVT.java
/*
 * Licensed Materials - Property of IBM
 * 
 * (c) Copyright IBM Corp. 2019.
 */
package dev.galasa.simbank.tests;

import static org.assertj.core.api.Assertions.assertThat;

import java.io.IOException;
import java.net.URISyntaxException;

import dev.galasa.Test;
import dev.galasa.artifact.BundleResources;
import dev.galasa.artifact.IBundleResources;
import dev.galasa.artifact.TestBundleResourceException;
import dev.galasa.core.manager.CoreManager;
import dev.galasa.core.manager.ICoreManager;
import dev.galasa.http.HttpClient;
import dev.galasa.http.HttpClientException;
import dev.galasa.http.IHttpClient;
import dev.galasa.zos.IZosImage;
import dev.galasa.zos.ZosImage;
import dev.galasa.zos.ZosManagerException;
import dev.galasa.zos3270.FieldNotFoundException;
import dev.galasa.zos3270.ITerminal;
import dev.galasa.zos3270.KeyboardLockedException;
import dev.galasa.zos3270.TerminalInterruptedException;
import dev.galasa.zos3270.TextNotFoundException;
import dev.galasa.zos3270.TimeoutException;
import dev.galasa.zos3270.Zos3270Terminal;
import dev.galasa.zos3270.spi.DatastreamException;
import dev.galasa.zos3270.spi.NetworkException;

@Test
public class SimBankIVT {

    @ZosImage(imageTag = "SIMBANK")
    public IZosImage        image;

    @Zos3270Terminal(imageTag = "SIMBANK")
    public ITerminal        terminal;

    @BundleResources
    public IBundleResources resources;

    @HttpClient
    public IHttpClient      client;

    @CoreManager
    public ICoreManager     coreManager;

    @Test
    public void testNotNull() {
        // Check all objects loaded
        assertThat(terminal).isNotNull();
        assertThat(resources).isNotNull();
        assertThat(client).isNotNull();
    }

    /**
     * Test which checks the initial balance of an account, uses the webservice to
     * credit the account, then checks the balance again. The test passes if the
     * final balance is equal to the old balance + the credited amount.
     * 
     * @throws TestBundleResourceException
     * @throws URISyntaxException
     * @throws IOException
     * @throws HttpClientException
     * @throws ZosManagerException
     * @throws TextNotFoundException
     * @throws FieldNotFoundException
     * @throws NetworkException
     * @throws KeyboardLockedException
     * @throws TimeoutException
     * @throws DatastreamException
     * @throws InterruptedException
     */
    @Test
    public void checkBankIsAvailable() throws TestBundleResourceException, URISyntaxException, IOException,
            HttpClientException, ZosManagerException, DatastreamException, TimeoutException, KeyboardLockedException,
            NetworkException, FieldNotFoundException, TextNotFoundException, TerminalInterruptedException {
        // Register the password to the confidential text filtering service
        coreManager.registerConfidentialText("SYS1", "IBMUSER password");

        // Logon through the session manager
        terminal.waitForKeyboard().positionCursorToFieldContaining("Userid").tab().type("IBMUSER")
                .positionCursorToFieldContaining("Password").tab().type("SYS1").enter().waitForKeyboard();

        // Assert that the session manager has a bank session available
        assertThat(terminal.retrieveScreen()).containsOnlyOnce("SIMPLATFORM MAIN MENU");
        assertThat(terminal.retrieveScreen()).containsOnlyOnce("BANKTEST");

        // Open banking application
        terminal.pf1().waitForKeyboard().clear().waitForKeyboard();
           
        terminal.type("bank").enter().waitForKeyboard();

        // Assert that the bank menu is showing
        assertThat(terminal.retrieveScreen()).containsOnlyOnce("Options     Description        PFKey ");
        assertThat(terminal.retrieveScreen()).containsOnlyOnce("BROWSE      Browse Accounts    PF1");
        assertThat(terminal.retrieveScreen()).containsOnlyOnce("TRANSF      Transfer Money     PF4");
    }
}

このテストコードを実際に動かしてみます。
EclipseのメニューからRun - Run Configurationsを選択
左側のメニューからGalasaを右クリックしてNew Configurationを選択
image.png

名前を適当に付けて、Project: dev.galasa.simbank.tests, TestClass:SimBankIVTを選択し、Apply, Run
image.png

Consoleに以下のような結果が表示されます。

テスト結果
18/08/2020 17:25:55.704 DEBUG dev.galasa.boot.Launcher.processCommandLine - Supplied command line arguments: --bootstrap file:///C:/Users/TomohiroTaguchi/.galasa/bootstrap.properties --overrides file:///C:/Users/TOMOHI~1/AppData/Local/Temp/galasa_eclipse_cache_8879301005844695930/galasaoverrides1461489270957804148.properties --localmaven file:/C:/Users/TomohiroTaguchi/.m2/repository/ --remotemaven https://repo.maven.apache.org/maven2/ --obr file:/C:/y/workspace/workspace_eclipse-jee-2020-06-R-galasa/.metadata/.plugins/dev.galasa.eclipse/workspace.obr --obr mvn:dev.galasa/dev.galasa.uber.obr/LATEST/obr --test dev.galasa.simbank.tests/dev.galasa.simbank.tests.SimBankIVT 
18/08/2020 17:25:55.724 DEBUG dev.galasa.boot.Launcher.launch - OBR Repository Files: [file:/C:/y/workspace/workspace_eclipse-jee-2020-06-R-galasa/.metadata/.plugins/dev.galasa.eclipse/workspace.obr, mvn:dev.galasa/dev.galasa.uber.obr/LATEST/obr]
18/08/2020 17:25:55.725 DEBUG dev.galasa.boot.Launcher.launch - Launching Framework...
18/08/2020 17:25:55.725 DEBUG dev.galasa.boot.Launcher.buildFramework - Launching Framework...
18/08/2020 17:25:55.725 DEBUG dev.galasa.boot.felix.FelixFramework.buildFramework - Building Felix Framework...
18/08/2020 17:25:55.808 DEBUG dev.galasa.boot.felix.FelixFramework.buildFramework - Initializing Felix Framework
18/08/2020 17:25:55.930 DEBUG dev.galasa.boot.felix.FelixFramework.buildFramework - Starting Felix Framework
18/08/2020 17:25:55.931 DEBUG dev.galasa.boot.felix.FelixFramework.buildFramework - Felix Framework started
18/08/2020 17:25:55.932 DEBUG dev.galasa.boot.felix.FelixFramework.buildFramework - Installing required OSGi bundles
18/08/2020 17:25:57.299 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/dev/galasa/dev.galasa.uber.obr/maven-metadata.xml
18/08/2020 17:25:59.132 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Version 'LATEST' resolved to 0.10.0
18/08/2020 17:25:59.134 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Checking https://repo.maven.apache.org/maven2
18/08/2020 17:25:59.134 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/dev/galasa/dev.galasa.uber.obr/0.10.0/dev.galasa.uber.obr-0.10.0.obr
18/08/2020 17:25:59.928 DEBUG dev.galasa.boot.felix.FelixFramework.buildFramework - installing Framework bundle
18/08/2020 17:26:00.116 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Checking https://repo.maven.apache.org/maven2
18/08/2020 17:26:00.116 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/org/apache/felix/org.apache.felix.http.servlet-api/1.1.2/org.apache.felix.http.servlet-api-1.1.2.jar
18/08/2020 17:26:00.305 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Checking https://repo.maven.apache.org/maven2
18/08/2020 17:26:00.305 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/org/apache/bcel/bcel/6.3/bcel-6.3.jar
18/08/2020 17:26:00.744 INFO  d.g.f.Framework - Framework service activated
18/08/2020 17:26:00.745 INFO  d.g.f.Framework - Framework version = 0.10.0
18/08/2020 17:26:00.751 INFO  d.g.f.Framework - Framework build   = Tue, 4 Aug 2020 22:57:46 +0900
18/08/2020 17:26:00.761 DEBUG dev.galasa.boot.Launcher.launch - Test Bundle: dev.galasa.simbank.tests
18/08/2020 17:26:00.761 DEBUG dev.galasa.boot.Launcher.launch - Test Class: dev.galasa.simbank.tests.SimBankIVT
18/08/2020 17:26:00.767 DEBUG dev.galasa.boot.felix.FelixFramework.runTest - Invoking runTest()
18/08/2020 17:26:00.768 INFO  d.g.f.FrameworkInitialisation - Initialising the Galasa Framework
18/08/2020 17:26:00.770 DEBUG d.g.f.FrameworkInitialisation - Configuration Property Store is file:///C:/Users/TomohiroTaguchi/.galasa/cps.properties
18/08/2020 17:26:00.781 DEBUG d.g.f.FrameworkInitialisation - Selected CPS Service is dev.galasa.framework.internal.cps.FpfConfigurationPropertyStore
18/08/2020 17:26:00.782 DEBUG d.g.f.FrameworkInitialisation - Dynamic Status Store is file:///C:/Users/TomohiroTaguchi/.galasa/dss.properties
18/08/2020 17:26:00.801 INFO  d.g.f.FrameworkInitialisation - Allocated Run Name U1 to this run
18/08/2020 17:26:00.803 DEBUG d.g.f.FrameworkInitialisation - Result Archive Stores are [file:///C:/Users/TomohiroTaguchi/.galasa/ras]
18/08/2020 17:26:00.827 DEBUG d.g.f.FrameworkInitialisation - Credentials Store is file:///C:/Users/TomohiroTaguchi/.galasa/credentials.properties
18/08/2020 17:26:00.834 INFO  d.g.f.FrameworkInitialisation - Framework initialised
18/08/2020 17:26:00.964 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Checking https://repo.maven.apache.org/maven2
18/08/2020 17:26:00.965 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/dev/galasa/com.jcraft.jsch/0.1.55/com.jcraft.jsch-0.1.55.jar
18/08/2020 17:26:01.267 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Checking https://repo.maven.apache.org/maven2
18/08/2020 17:26:01.268 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
18/08/2020 17:26:01.957 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Checking https://repo.maven.apache.org/maven2
18/08/2020 17:26:01.958 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar
18/08/2020 17:26:02.238 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Checking https://repo.maven.apache.org/maven2
18/08/2020 17:26:02.238 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/org/apache/felix/org.apache.felix.configadmin/1.9.16/org.apache.felix.configadmin-1.9.16.jar
18/08/2020 17:26:02.572 INFO  d.g.f.TestRunner - Run test: dev.galasa.simbank.tests/dev.galasa.simbank.tests.SimBankIVT
18/08/2020 17:26:02.660 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Checking https://repo.maven.apache.org/maven2
18/08/2020 17:26:02.661 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/dev/galasa/dev.galasa.zosbatch.zosmf.manager/0.10.0/dev.galasa.zosbatch.zosmf.manager-0.10.0.jar
18/08/2020 17:26:03.074 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Checking https://repo.maven.apache.org/maven2
18/08/2020 17:26:03.074 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/dev/galasa/dev.galasa.zosmf.manager/0.10.0/dev.galasa.zosmf.manager-0.10.0.jar
18/08/2020 17:26:03.519 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Checking https://repo.maven.apache.org/maven2
18/08/2020 17:26:03.520 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/dev/galasa/dev.galasa.zosconsole.zosmf.manager/0.10.0/dev.galasa.zosconsole.zosmf.manager-0.10.0.jar
18/08/2020 17:26:03.838 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Checking https://repo.maven.apache.org/maven2
18/08/2020 17:26:03.839 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/dev/galasa/dev.galasa.zosfile.zosmf.manager/0.10.0/dev.galasa.zosfile.zosmf.manager-0.10.0.jar
18/08/2020 17:26:04.120 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Checking https://repo.maven.apache.org/maven2
18/08/2020 17:26:04.120 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/dev/galasa/dev.galasa.zostsocommand.ssh.manager/0.10.0/dev.galasa.zostsocommand.ssh.manager-0.10.0.jar
18/08/2020 17:26:04.422 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Checking https://repo.maven.apache.org/maven2
18/08/2020 17:26:04.423 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/dev/galasa/dev.galasa.zosunixcommand.ssh.manager/0.10.0/dev.galasa.zosunixcommand.ssh.manager-0.10.0.jar
18/08/2020 17:26:04.685 DEBUG d.g.f.TestRunManagers - The following Managers are active:-
18/08/2020 17:26:04.685 DEBUG d.g.f.TestRunManagers -    dev.galasa.core.manager.internal.CoreManager
18/08/2020 17:26:04.685 DEBUG d.g.f.TestRunManagers -    dev.galasa.zos.internal.ZosManagerImpl
18/08/2020 17:26:04.686 DEBUG d.g.f.TestRunManagers -    dev.galasa.ipnetwork.internal.IpNetworkManagerImpl
18/08/2020 17:26:04.686 DEBUG d.g.f.TestRunManagers -    dev.galasa.zos3270.internal.Zos3270ManagerImpl
18/08/2020 17:26:04.686 DEBUG d.g.f.TestRunManagers -    dev.galasa.http.internal.HttpManagerImpl
18/08/2020 17:26:04.686 DEBUG d.g.f.TestRunManagers -    dev.galasa.artifact.internal.ArtifactManagerImpl
18/08/2020 17:26:04.687 DEBUG d.g.f.TestRunManagers - The following Managers are sorted in provisioning order:-
18/08/2020 17:26:04.687 DEBUG d.g.f.TestRunManagers -    dev.galasa.core.manager.internal.CoreManager
18/08/2020 17:26:04.687 DEBUG d.g.f.TestRunManagers -    dev.galasa.zos.internal.ZosManagerImpl
18/08/2020 17:26:04.687 DEBUG d.g.f.TestRunManagers -    dev.galasa.ipnetwork.internal.IpNetworkManagerImpl
18/08/2020 17:26:04.687 DEBUG d.g.f.TestRunManagers -    dev.galasa.zos3270.internal.Zos3270ManagerImpl
18/08/2020 17:26:04.688 DEBUG d.g.f.TestRunManagers -    dev.galasa.http.internal.HttpManagerImpl
18/08/2020 17:26:04.688 DEBUG d.g.f.TestRunManagers -    dev.galasa.artifact.internal.ArtifactManagerImpl
18/08/2020 17:26:04.719 INFO  d.g.f.TestRunner - Starting Provision Generate phase
18/08/2020 17:26:04.722 INFO  d.g.z.i.ZosManagerImpl - zOS DSE Image SIMBANK selected for zosTag 'SIMBANK'
18/08/2020 17:26:05.022 INFO  d.g.z.i.Zos3270ManagerImpl - Generated a terminal for zOS Image tagged SIMBANK
18/08/2020 17:26:05.036 INFO  d.g.f.TestRunner - Starting Provision Build phase
18/08/2020 17:26:05.037 INFO  d.g.f.TestRunner - Starting Provision Start phase
18/08/2020 17:26:05.037 INFO  d.g.z.i.Zos3270ManagerImpl - Connecting zOS3270 Terminals
18/08/2020 17:26:05.060 INFO  d.g.f.TestRunner - Running the test class
18/08/2020 17:26:05.060 INFO  d.g.f.TestClassWrapper - Starting
----------------------- ****************************************************************************************************
----------------------- *** Start of test class dev.galasa.simbank.tests.SimBankIVT
----------------------- ****************************************************************************************************
18/08/2020 17:26:05.061 INFO  d.g.f.GenericMethodWrapper - Starting
----------------------- ****************************************************************************************************
----------------------- *** Start of test method dev.galasa.simbank.tests.SimBankIVT#testNotNull,type=Test
----------------------- ****************************************************************************************************
18/08/2020 17:26:05.096 INFO  d.g.f.GenericMethodWrapper - Ending
----------------------- ****************************************************************************************************
----------------------- *** Passed - Test method dev.galasa.simbank.tests.SimBankIVT#testNotNull,type=Test
----------------------- ****************************************************************************************************
18/08/2020 17:26:05.097 INFO  d.g.f.GenericMethodWrapper - Starting
----------------------- ****************************************************************************************************
----------------------- *** Start of test method dev.galasa.simbank.tests.SimBankIVT#checkBankIsAvailable,type=Test
----------------------- ****************************************************************************************************
18/08/2020 17:26:05.098 INFO  d.g.f.i.c.FrameworkConfidentialTextService - Confidential text registered as '*1**', with comment IBMUSER password
18/08/2020 17:26:05.317 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-1
=| TERM0001                   SIMPLATFORM LOGON SCREEN                    17:26:05|
=| -------------------------------------------------------------------------------|
=|                                                                                |
=|                                                                                |
=|                     *******\    ******\   ****\      ****\                     |
=|                    *********\   ******\   *****\    *****\                     |
=|                    **\\\\\**\    \**\\\   **\ **\  **\\**\                     |
=|                    **\            **\     **\  **\**\\ **\                     |
=|                    *********\     **\     **\   ***\\  **\                     |
=|                    *********\     **\     **\    *\\   **\                     |
=|                     \\\\\\**\     **\     **\     \    **\                     |
=|                           **\     **\     **\          **\                     |
=|                    *********\   ******\   **\          **\                     |
=|                     *******\\   ******\   **\          **\                     |
=|                      \\\\\\\     \\\\\\    \\           \\                     |
=|                                                                                |
=|                                                                                |
=|                                P L A T F O R M                                 |
=|                                                                                |
=|                                                                                |
=| -------------------------------------------------------------------------------|
=| Userid ===>          Password ===>                                             |
^|             ^
=|                                                                                |
=|                                                                                |

18/08/2020 17:26:05.340 DEBUG d.g.z.s.Zos3270TerminalImpl - SENDING, ENTER to 3270 terminal term1,  updateId=term1-2
=| TERM0001                   SIMPLATFORM LOGON SCREEN                    17:26:05|
=| -------------------------------------------------------------------------------|
=|                                                                                |
=|                                                                                |
=|                     *******\    ******\   ****\      ****\                     |
=|                    *********\   ******\   *****\    *****\                     |
=|                    **\\\\\**\    \**\\\   **\ **\  **\\**\                     |
=|                    **\            **\     **\  **\**\\ **\                     |
=|                    *********\     **\     **\   ***\\  **\                     |
=|                    *********\     **\     **\    *\\   **\                     |
=|                     \\\\\\**\     **\     **\     \    **\                     |
=|                           **\     **\     **\          **\                     |
=|                    *********\   ******\   **\          **\                     |
=|                     *******\\   ******\   **\          **\                     |
=|                      \\\\\\\     \\\\\\    \\           \\                     |
=|                                                                                |
=|                                                                                |
=|                                P L A T F O R M                                 |
=|                                                                                |
=|                                                                                |
=| -------------------------------------------------------------------------------|
=| Userid ===> IBMUSER  Password ===> *1**                                        |
^|                                        ^
=|                                                                                |
=|                                                                                |

18/08/2020 17:26:05.361 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-3
=| TERM0001                     SIMPLATFORM MAIN MENU                     17:26:05|
=| -------------------------------------------------------------------------------|
=|                                                                                |
=|  Application  PKey  Status                                                     |
=|  -----------  ----  -------------------------------------------------          |
=|                                                                                |
=|  BANKTEST     PF1   UP                                                         |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=| -------------------------------------------------------------------------------|
=| Application ===>                                                               |
^|                  ^
=|                                                                                |
=|                                                                                |

18/08/2020 17:26:05.377 DEBUG d.g.z.s.Zos3270TerminalImpl - SENDING, PF1 to 3270 terminal term1,  updateId=term1-4
=| TERM0001                     SIMPLATFORM MAIN MENU                     17:26:05|
=| -------------------------------------------------------------------------------|
=|                                                                                |
=|  Application  PKey  Status                                                     |
=|  -----------  ----  -------------------------------------------------          |
=|                                                                                |
=|  BANKTEST     PF1   UP                                                         |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=| -------------------------------------------------------------------------------|
=| Application ===>                                                               |
^|                  ^
=|                                                                                |
=|                                                                                |

18/08/2020 17:26:05.396 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-5
=| DFHZC2312 ***  WELCOME TO CICS  *** 17:26:05                                   |
^|^
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                     ******\  ******\  ******\   ******\(R)                     |
=|                    ********\ ******\ ********\ ********\                       |
=|                    **\\\\**\   **\\\ **\\\\**\ **\\\\**\                       |
=|                    **\    \\   **\   **\    \\ **\    \\                       |
=|                    **\         **\   **\       *******\                        |
=|                    **\         **\   **\        *******\                       |
=|                    **\         **\   **\         \\\\**\                       |
=|                    **\   **\   **\   **\   **\ **\   **\                       |
=|                    ********\ ******\ ********\ ********\                       |
=|                     ******\\ ******\  ******\\  ******\\                       |
=|                      \\\\\\   \\\\\\   \\\\\\    \\\\\\                        |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 17:26:05.412 DEBUG d.g.z.s.Zos3270TerminalImpl - SENDING, CLEAR to 3270 terminal term1,  updateId=term1-6
=|                                                                                |
^|^
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 17:26:05.608 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-7
=|                                                                                |
^|^
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 17:26:05.619 DEBUG d.g.z.s.Zos3270TerminalImpl - SENDING, ENTER to 3270 terminal term1,  updateId=term1-8
=|bank                                                                            |
^|    ^
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 17:26:05.640 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-9
=| CONNECTED                      SIMBANK MAIN MENU                       17:26:05|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
^|      ^
=|                                                                                |
=|   Options     Description        PFKey                                         |
=|   -------     ---------------------------------------------------------------  |
=|   BROWSE      Browse Accounts    PF1                                           |
=|   TRANSF      Transfer Money     PF4                                           |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 17:26:05.642 INFO  d.g.f.GenericMethodWrapper - Ending
----------------------- ****************************************************************************************************
----------------------- *** Passed - Test method dev.galasa.simbank.tests.SimBankIVT#checkBankIsAvailable,type=Test
----------------------- ****************************************************************************************************
18/08/2020 17:26:05.642 INFO  d.g.f.TestClassWrapper - Ending
----------------------- ****************************************************************************************************
----------------------- *** Passed - Test class dev.galasa.simbank.tests.SimBankIVT
----------------------- ****************************************************************************************************
18/08/2020 17:26:05.644 INFO  d.g.f.TestRunner - Starting Provision Stop phase
18/08/2020 17:26:05.659 INFO  d.g.f.TestRunner - Starting Provision Discard phase
18/08/2020 17:26:06.088 DEBUG dev.galasa.boot.felix.FelixFramework.stopFramework - Stopping Felix framework
18/08/2020 17:26:06.107 INFO  d.g.f.Framework - Framework service deactivated
18/08/2020 17:26:06.121 DEBUG dev.galasa.boot.felix.FelixFramework.stopFramework - Felix framework stopped
18/08/2020 17:26:06.121 INFO dev.galasa.boot.Launcher.launch - Boot complete

3270端末でのテストをテストコードで実行できました!

以下のような画面も裏で表示されていました。
image.png

テスト(2) BasicAccountCreditTest

これはCICS Webサービスとして実装されている(と思われる)"特定の口座の金額をアップデートする"ためのロジックをテストするものです。
テスト対象はWebサービス呼び出しですが、前後の金額情報を取得するのに3270画面のフローを入れています。
つまり、テストコードは以下のような流れとなっています。

  1. 3270アプリを呼び出して更新前の値を取得
  2. Webサービス呼び出しで更新処理(特定口座にある特定の金額を振り込み)
  3. 3270アプリを呼び出して更新後の値を取得
  4. 更新前後の値をチェック

参考までに... テスト対象のロジックはWebサービス呼び出しなので、例えば以下のように汎用的なツール(ChromeのTarend API Tester)でもSOAPリクエストの動作確認ができます。
image.png

テストコード
BasicAccountCreditTest
/*
 * Licensed Materials - Property of IBM
 * 
 * (c) Copyright IBM Corp. 2019.
 */
package dev.galasa.simbank.tests;

import static org.assertj.core.api.Assertions.assertThat;

import java.io.IOException;
import java.math.BigDecimal;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;

import dev.galasa.Test;
import dev.galasa.artifact.BundleResources;
import dev.galasa.artifact.IBundleResources;
import dev.galasa.artifact.TestBundleResourceException;
import dev.galasa.core.manager.CoreManager;
import dev.galasa.core.manager.ICoreManager;
import dev.galasa.http.HttpClient;
import dev.galasa.http.HttpClientException;
import dev.galasa.http.IHttpClient;
import dev.galasa.simbank.manager.ISimBank;
import dev.galasa.simbank.manager.SimBank;
import dev.galasa.zos.IZosImage;
import dev.galasa.zos.ZosImage;
import dev.galasa.zos.ZosManagerException;
import dev.galasa.zos3270.FieldNotFoundException;
import dev.galasa.zos3270.ITerminal;
import dev.galasa.zos3270.KeyboardLockedException;
import dev.galasa.zos3270.TerminalInterruptedException;
import dev.galasa.zos3270.TextNotFoundException;
import dev.galasa.zos3270.TimeoutException;
import dev.galasa.zos3270.Zos3270Terminal;
import dev.galasa.zos3270.spi.DatastreamException;
import dev.galasa.zos3270.spi.NetworkException;

@Test
public class BasicAccountCreditTest {
    
    @SimBank
    public ISimBank        simBank;

    @ZosImage(imageTag = "SIMBANK")
    public IZosImage        image;

    @Zos3270Terminal(imageTag = "SIMBANK")
    public ITerminal        terminal;

    @BundleResources
    public IBundleResources resources;

    @CoreManager
    public ICoreManager     coreManager;

    @HttpClient
    public IHttpClient      client;

    /**
     * Test which checks the initial balance of an account, uses the webservice to
     * credit the account, then checks the balance again. The test passes if the
     * final balance is equal to the old balance + the credited amount.
     * 
     * @throws TestBundleResourceException
     * @throws URISyntaxException
     * @throws IOException
     * @throws HttpClientException
     * @throws ZosManagerException
     * @throws TextNotFoundException
     * @throws FieldNotFoundException
     * @throws NetworkException
     * @throws KeyboardLockedException
     * @throws TimeoutException
     * @throws DatastreamException
     * @throws InterruptedException
     */
    @Test
    public void updateAccountWebServiceTest() throws TestBundleResourceException, URISyntaxException, IOException,
            HttpClientException, ZosManagerException, DatastreamException, TimeoutException, KeyboardLockedException,
            NetworkException, FieldNotFoundException, TextNotFoundException, TerminalInterruptedException {
        // Register the password to the confidential text filtering service
        coreManager.registerConfidentialText("SYS1", "IBMUSER password");

        // Initial actions to get into banking application
        terminal.waitForKeyboard().positionCursorToFieldContaining("Userid").tab().type("IBMUSER")
                .positionCursorToFieldContaining("Password").tab().type("SYS1").enter().waitForKeyboard()

                // Open banking application
                .pf1().waitForKeyboard().clear().waitForKeyboard().type("bank").enter().waitForKeyboard();

        // Obtain the initial balance
        BigDecimal userBalance = getBalance("123456789");

        // Set the amount be credited and call web service
        BigDecimal amount = BigDecimal.valueOf(500.50);
        HashMap<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("ACCOUNT_NUMBER", "123456789");
        parameters.put("AMOUNT", amount.toString());

        // Load sample request with the given parameters
        String textContent = resources.retrieveSkeletonFileAsString("/resources/skeletons/testSkel.skel", parameters);

        // Invoke the web request
        client.setURI(new URI("http://" + this.simBank.getHost() + ":" + this.simBank.getWebnetPort()));
        client.postText("updateAccount", textContent);

        // Obtain the final balance
        BigDecimal newUserBalance = getBalance("123456789");

        // Assert that the correct amount has been credited to the account
        assertThat(newUserBalance).isEqualTo(userBalance.add(amount));
    }

    /**
     * Navigate through the banking application and extract the balance of a given
     * account
     * 
     * @param accountNum - Account Number of the account being queried
     * @return Balance of the account being queried
     * @throws TextNotFoundException
     * @throws FieldNotFoundException
     * @throws NetworkException
     * @throws KeyboardLockedException
     * @throws TimeoutException
     * @throws DatastreamException
     * @throws InterruptedException
     */
    private BigDecimal getBalance(String accountNum)
            throws DatastreamException, TimeoutException, KeyboardLockedException, NetworkException,
            FieldNotFoundException, TextNotFoundException, TerminalInterruptedException {
        BigDecimal amount = BigDecimal.ZERO;
        // Open account menu and enter account number
        terminal.pf1().waitForKeyboard().positionCursorToFieldContaining("Account Number").tab().type(accountNum)
                .enter().waitForKeyboard();

        // Retrieve balance from screen
        amount = new BigDecimal(terminal.retrieveFieldTextAfterFieldWithString("Balance").trim());

        // Return to bank menu
        terminal.pf3().waitForKeyboard();
        return amount;
    }
}

このコードの中では、Webサービス呼び出しの際のSOAPメッセージの組み立てとして、以下のようなSkeltonを用意していて、そこに含まれている変数を置き換えるということをやっています。その辺の仕組みもGalasaフレームワークで提供されているようです。

testSkel.skel
<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
<soapenv:Body>
<ns1:UPDACCTOperation xmlns:ns1='http://www.UPDACCT.STCUSTN2.Request.com'>
<ns1:update_account_record>
<ns1:account_key>
<ns1:sort_code>00-00-00</ns1:sort_code>
<ns1:account_number>++ACCOUNT_NUMBER++</ns1:account_number>
</ns1:account_key>
<ns1:account_change>++AMOUNT++</ns1:account_change>
</ns1:update_account_record></ns1:UPDACCTOperation>
</soapenv:Body>
</soapenv:Envelope>

実行するには、先の例と同様にRun Configurationから dev.galasa.simbank.testsのBasicAccountCreditTestをTestClassに指定して実行します。
image.png

テスト結果
18/08/2020 18:40:07.096 DEBUG dev.galasa.boot.Launcher.processCommandLine - Supplied command line arguments: --bootstrap file:///C:/Users/TomohiroTaguchi/.galasa/bootstrap.properties --overrides file:///C:/Users/TOMOHI~1/AppData/Local/Temp/galasa_eclipse_cache_8879301005844695930/galasaoverrides1146231306188016707.properties --localmaven file:/C:/Users/TomohiroTaguchi/.m2/repository/ --remotemaven https://repo.maven.apache.org/maven2/ --obr file:/C:/y/workspace/workspace_eclipse-jee-2020-06-R-galasa/.metadata/.plugins/dev.galasa.eclipse/workspace.obr --obr mvn:dev.galasa/dev.galasa.uber.obr/LATEST/obr --test dev.galasa.simbank.tests/dev.galasa.simbank.tests.BasicAccountCreditTest 
18/08/2020 18:40:07.118 DEBUG dev.galasa.boot.Launcher.launch - OBR Repository Files: [file:/C:/y/workspace/workspace_eclipse-jee-2020-06-R-galasa/.metadata/.plugins/dev.galasa.eclipse/workspace.obr, mvn:dev.galasa/dev.galasa.uber.obr/LATEST/obr]
18/08/2020 18:40:07.119 DEBUG dev.galasa.boot.Launcher.launch - Launching Framework...
18/08/2020 18:40:07.119 DEBUG dev.galasa.boot.Launcher.buildFramework - Launching Framework...
18/08/2020 18:40:07.119 DEBUG dev.galasa.boot.felix.FelixFramework.buildFramework - Building Felix Framework...
18/08/2020 18:40:07.292 DEBUG dev.galasa.boot.felix.FelixFramework.buildFramework - Initializing Felix Framework
18/08/2020 18:40:07.412 DEBUG dev.galasa.boot.felix.FelixFramework.buildFramework - Starting Felix Framework
18/08/2020 18:40:07.413 DEBUG dev.galasa.boot.felix.FelixFramework.buildFramework - Felix Framework started
18/08/2020 18:40:07.413 DEBUG dev.galasa.boot.felix.FelixFramework.buildFramework - Installing required OSGi bundles
18/08/2020 18:40:08.778 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Attempting to download https://repo.maven.apache.org/maven2/dev/galasa/dev.galasa.uber.obr/maven-metadata.xml
18/08/2020 18:40:10.634 DEBUG d.g.f.m.r.i.GalasaMavenUrlHandlerService - Version 'LATEST' resolved to 0.10.0
18/08/2020 18:40:10.684 DEBUG dev.galasa.boot.felix.FelixFramework.buildFramework - installing Framework bundle
18/08/2020 18:40:11.095 INFO  d.g.f.Framework - Framework service activated
18/08/2020 18:40:11.095 INFO  d.g.f.Framework - Framework version = 0.10.0
18/08/2020 18:40:11.102 INFO  d.g.f.Framework - Framework build   = Tue, 4 Aug 2020 22:57:46 +0900
18/08/2020 18:40:11.117 DEBUG dev.galasa.boot.Launcher.launch - Test Bundle: dev.galasa.simbank.tests
18/08/2020 18:40:11.117 DEBUG dev.galasa.boot.Launcher.launch - Test Class: dev.galasa.simbank.tests.BasicAccountCreditTest
18/08/2020 18:40:11.124 DEBUG dev.galasa.boot.felix.FelixFramework.runTest - Invoking runTest()
18/08/2020 18:40:11.125 INFO  d.g.f.FrameworkInitialisation - Initialising the Galasa Framework
18/08/2020 18:40:11.127 DEBUG d.g.f.FrameworkInitialisation - Configuration Property Store is file:///C:/Users/TomohiroTaguchi/.galasa/cps.properties
18/08/2020 18:40:11.138 DEBUG d.g.f.FrameworkInitialisation - Selected CPS Service is dev.galasa.framework.internal.cps.FpfConfigurationPropertyStore
18/08/2020 18:40:11.139 DEBUG d.g.f.FrameworkInitialisation - Dynamic Status Store is file:///C:/Users/TomohiroTaguchi/.galasa/dss.properties
18/08/2020 18:40:11.164 INFO  d.g.f.FrameworkInitialisation - Allocated Run Name U10 to this run
18/08/2020 18:40:11.166 DEBUG d.g.f.FrameworkInitialisation - Result Archive Stores are [file:///C:/Users/TomohiroTaguchi/.galasa/ras/]
18/08/2020 18:40:11.190 DEBUG d.g.f.FrameworkInitialisation - Credentials Store is file:///C:/Users/TomohiroTaguchi/.galasa/credentials.properties
18/08/2020 18:40:11.197 INFO  d.g.f.FrameworkInitialisation - Framework initialised
18/08/2020 18:40:12.662 INFO  d.g.f.TestRunner - Run test: dev.galasa.simbank.tests/dev.galasa.simbank.tests.BasicAccountCreditTest
18/08/2020 18:40:13.758 DEBUG d.g.f.TestRunManagers - The following Managers are active:-
18/08/2020 18:40:13.759 DEBUG d.g.f.TestRunManagers -    dev.galasa.core.manager.internal.CoreManager
18/08/2020 18:40:13.759 DEBUG d.g.f.TestRunManagers -    dev.galasa.simbank.manager.internal.SimBankManagerImpl
18/08/2020 18:40:13.759 DEBUG d.g.f.TestRunManagers -    dev.galasa.zos.internal.ZosManagerImpl
18/08/2020 18:40:13.760 DEBUG d.g.f.TestRunManagers -    dev.galasa.ipnetwork.internal.IpNetworkManagerImpl
18/08/2020 18:40:13.760 DEBUG d.g.f.TestRunManagers -    dev.galasa.zos3270.internal.Zos3270ManagerImpl
18/08/2020 18:40:13.760 DEBUG d.g.f.TestRunManagers -    dev.galasa.http.internal.HttpManagerImpl
18/08/2020 18:40:13.760 DEBUG d.g.f.TestRunManagers -    dev.galasa.artifact.internal.ArtifactManagerImpl
18/08/2020 18:40:13.761 DEBUG d.g.f.TestRunManagers - The following Managers are sorted in provisioning order:-
18/08/2020 18:40:13.761 DEBUG d.g.f.TestRunManagers -    dev.galasa.core.manager.internal.CoreManager
18/08/2020 18:40:13.761 DEBUG d.g.f.TestRunManagers -    dev.galasa.zos.internal.ZosManagerImpl
18/08/2020 18:40:13.761 DEBUG d.g.f.TestRunManagers -    dev.galasa.zos3270.internal.Zos3270ManagerImpl
18/08/2020 18:40:13.762 DEBUG d.g.f.TestRunManagers -    dev.galasa.ipnetwork.internal.IpNetworkManagerImpl
18/08/2020 18:40:13.762 DEBUG d.g.f.TestRunManagers -    dev.galasa.http.internal.HttpManagerImpl
18/08/2020 18:40:13.762 DEBUG d.g.f.TestRunManagers -    dev.galasa.simbank.manager.internal.SimBankManagerImpl
18/08/2020 18:40:13.762 DEBUG d.g.f.TestRunManagers -    dev.galasa.artifact.internal.ArtifactManagerImpl
18/08/2020 18:40:13.949 INFO  d.g.f.TestRunner - Starting Provision Generate phase
18/08/2020 18:40:13.952 INFO  d.g.z.i.ZosManagerImpl - zOS DSE Image SIMBANK selected for zosTag 'SIMBANK'
18/08/2020 18:40:14.042 INFO  d.g.z.i.Zos3270ManagerImpl - Generated a terminal for zOS Image tagged SIMBANK
18/08/2020 18:40:14.091 INFO  d.g.f.i.c.FrameworkConfidentialTextService - Confidential text registered as '*1**', with comment IBMUSER password
18/08/2020 18:40:14.185 INFO  d.g.s.m.i.SimBankManagerImpl - SimBank instance SIMBANK provisioned for this run
18/08/2020 18:40:14.190 INFO  d.g.f.TestRunner - Starting Provision Build phase
18/08/2020 18:40:14.191 INFO  d.g.f.TestRunner - Starting Provision Start phase
18/08/2020 18:40:14.192 INFO  d.g.z.i.Zos3270ManagerImpl - Connecting zOS3270 Terminals
18/08/2020 18:40:14.479 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-1
=| TERM0001                   SIMPLATFORM LOGON SCREEN                    18:40:14|
=| -------------------------------------------------------------------------------|
=|                                                                                |
=|                                                                                |
=|                     *******\    ******\   ****\      ****\                     |
=|                    *********\   ******\   *****\    *****\                     |
=|                    **\\\\\**\    \**\\\   **\ **\  **\\**\                     |
=|                    **\            **\     **\  **\**\\ **\                     |
=|                    *********\     **\     **\   ***\\  **\                     |
=|                    *********\     **\     **\    *\\   **\                     |
=|                     \\\\\\**\     **\     **\     \    **\                     |
=|                           **\     **\     **\          **\                     |
=|                    *********\   ******\   **\          **\                     |
=|                     *******\\   ******\   **\          **\                     |
=|                      \\\\\\\     \\\\\\    \\           \\                     |
=|                                                                                |
=|                                                                                |
=|                                P L A T F O R M                                 |
=|                                                                                |
=|                                                                                |
=| -------------------------------------------------------------------------------|
=| Userid ===>          Password ===>                                             |
^|             ^
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.479 DEBUG d.g.s.m.i.SimBankTerminalImpl - RECEIVED update to 3270 terminal simbank-ctrl,  updateId=simbank-ctrl-1
=| TERM0001                   SIMPLATFORM LOGON SCREEN                    18:40:14|
=| -------------------------------------------------------------------------------|
=|                                                                                |
=|                                                                                |
=|                     *******\    ******\   ****\      ****\                     |
=|                    *********\   ******\   *****\    *****\                     |
=|                    **\\\\\**\    \**\\\   **\ **\  **\\**\                     |
=|                    **\            **\     **\  **\**\\ **\                     |
=|                    *********\     **\     **\   ***\\  **\                     |
=|                    *********\     **\     **\    *\\   **\                     |
=|                     \\\\\\**\     **\     **\     \    **\                     |
=|                           **\     **\     **\          **\                     |
=|                    *********\   ******\   **\          **\                     |
=|                     *******\\   ******\   **\          **\                     |
=|                      \\\\\\\     \\\\\\    \\           \\                     |
=|                                                                                |
=|                                                                                |
=|                                P L A T F O R M                                 |
=|                                                                                |
=|                                                                                |
=| -------------------------------------------------------------------------------|
=| Userid ===>          Password ===>                                             |
^|             ^
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.494 DEBUG d.g.s.m.i.SimBankTerminalImpl - SENDING, ENTER to 3270 terminal simbank-ctrl,  updateId=simbank-ctrl-2
=| TERM0001                   SIMPLATFORM LOGON SCREEN                    18:40:14|
=| -------------------------------------------------------------------------------|
=|                                                                                |
=|                                                                                |
=|                     *******\    ******\   ****\      ****\                     |
=|                    *********\   ******\   *****\    *****\                     |
=|                    **\\\\\**\    \**\\\   **\ **\  **\\**\                     |
=|                    **\            **\     **\  **\**\\ **\                     |
=|                    *********\     **\     **\   ***\\  **\                     |
=|                    *********\     **\     **\    *\\   **\                     |
=|                     \\\\\\**\     **\     **\     \    **\                     |
=|                           **\     **\     **\          **\                     |
=|                    *********\   ******\   **\          **\                     |
=|                     *******\\   ******\   **\          **\                     |
=|                      \\\\\\\     \\\\\\    \\           \\                     |
=|                                                                                |
=|                                                                                |
=|                                P L A T F O R M                                 |
=|                                                                                |
=|                                                                                |
=| -------------------------------------------------------------------------------|
=| Userid ===> IBMUSER  Password ===> *1**                                        |
^|                                        ^
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.539 DEBUG d.g.s.m.i.SimBankTerminalImpl - RECEIVED update to 3270 terminal simbank-ctrl,  updateId=simbank-ctrl-3
=| TERM0001                     SIMPLATFORM MAIN MENU                     18:40:14|
=| -------------------------------------------------------------------------------|
=|                                                                                |
=|  Application  PKey  Status                                                     |
=|  -----------  ----  -------------------------------------------------          |
=|                                                                                |
=|  BANKTEST     PF1   UP                                                         |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=| -------------------------------------------------------------------------------|
=| Application ===>                                                               |
^|                  ^
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.549 DEBUG d.g.s.m.i.SimBankTerminalImpl - SENDING, ENTER to 3270 terminal simbank-ctrl,  updateId=simbank-ctrl-4
=| TERM0001                     SIMPLATFORM MAIN MENU                     18:40:14|
=| -------------------------------------------------------------------------------|
=|                                                                                |
=|  Application  PKey  Status                                                     |
=|  -----------  ----  -------------------------------------------------          |
=|                                                                                |
=|  BANKTEST     PF1   UP                                                         |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=| -------------------------------------------------------------------------------|
=| Application ===> BANKTEST                                                      |
^|                          ^
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.568 DEBUG d.g.s.m.i.SimBankTerminalImpl - RECEIVED update to 3270 terminal simbank-ctrl,  updateId=simbank-ctrl-5
=| DFHZC2312 ***  WELCOME TO CICS  *** 18:40:14                                   |
^|^
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                     ******\  ******\  ******\   ******\(R)                     |
=|                    ********\ ******\ ********\ ********\                       |
=|                    **\\\\**\   **\\\ **\\\\**\ **\\\\**\                       |
=|                    **\    \\   **\   **\    \\ **\    \\                       |
=|                    **\         **\   **\       *******\                        |
=|                    **\         **\   **\        *******\                       |
=|                    **\         **\   **\         \\\\**\                       |
=|                    **\   **\   **\   **\   **\ **\   **\                       |
=|                    ********\ ******\ ********\ ********\                       |
=|                     ******\\ ******\  ******\\  ******\\                       |
=|                      \\\\\\   \\\\\\   \\\\\\    \\\\\\                        |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.580 DEBUG d.g.s.m.i.SimBankTerminalImpl - SENDING, CLEAR to 3270 terminal simbank-ctrl,  updateId=simbank-ctrl-6
=|                                                                                |
^|^
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.707 DEBUG d.g.s.m.i.SimBankTerminalImpl - RECEIVED update to 3270 terminal simbank-ctrl,  updateId=simbank-ctrl-7
=|                                                                                |
^|^
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.716 DEBUG d.g.s.m.i.SimBankTerminalImpl - SENDING, ENTER to 3270 terminal simbank-ctrl,  updateId=simbank-ctrl-8
=|bank                                                                            |
^|    ^
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.731 DEBUG d.g.s.m.i.SimBankTerminalImpl - RECEIVED update to 3270 terminal simbank-ctrl,  updateId=simbank-ctrl-9
=| CONNECTED                      SIMBANK MAIN MENU                       18:40:14|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
^|      ^
=|                                                                                |
=|   Options     Description        PFKey                                         |
=|   -------     ---------------------------------------------------------------  |
=|   BROWSE      Browse Accounts    PF1                                           |
=|   TRANSF      Transfer Money     PF4                                           |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.732 INFO  d.g.s.m.i.SimBankImpl - Connected to SimBank Terminal
18/08/2020 18:40:14.734 INFO  d.g.f.TestRunner - Running the test class
18/08/2020 18:40:14.734 INFO  d.g.f.TestClassWrapper - Starting
----------------------- ****************************************************************************************************
----------------------- *** Start of test class dev.galasa.simbank.tests.BasicAccountCreditTest
----------------------- ****************************************************************************************************
18/08/2020 18:40:14.734 INFO  d.g.f.GenericMethodWrapper - Starting
----------------------- ****************************************************************************************************
----------------------- *** Start of test method dev.galasa.simbank.tests.BasicAccountCreditTest#updateAccountWebServiceTest,type=Test
----------------------- ****************************************************************************************************
18/08/2020 18:40:14.735 INFO  d.g.f.i.c.FrameworkConfidentialTextService - Confidential text registered as '*2**', with comment IBMUSER password
18/08/2020 18:40:14.747 DEBUG d.g.z.s.Zos3270TerminalImpl - SENDING, ENTER to 3270 terminal term1,  updateId=term1-2
=| TERM0001                   SIMPLATFORM LOGON SCREEN                    18:40:14|
=| -------------------------------------------------------------------------------|
=|                                                                                |
=|                                                                                |
=|                     *******\    ******\   ****\      ****\                     |
=|                    *********\   ******\   *****\    *****\                     |
=|                    **\\\\\**\    \**\\\   **\ **\  **\\**\                     |
=|                    **\            **\     **\  **\**\\ **\                     |
=|                    *********\     **\     **\   ***\\  **\                     |
=|                    *********\     **\     **\    *\\   **\                     |
=|                     \\\\\\**\     **\     **\     \    **\                     |
=|                           **\     **\     **\          **\                     |
=|                    *********\   ******\   **\          **\                     |
=|                     *******\\   ******\   **\          **\                     |
=|                      \\\\\\\     \\\\\\    \\           \\                     |
=|                                                                                |
=|                                                                                |
=|                                P L A T F O R M                                 |
=|                                                                                |
=|                                                                                |
=| -------------------------------------------------------------------------------|
=| Userid ===> IBMUSER  Password ===> *1**                                        |
^|                                        ^
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.763 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-3
=| TERM0001                     SIMPLATFORM MAIN MENU                     18:40:14|
=| -------------------------------------------------------------------------------|
=|                                                                                |
=|  Application  PKey  Status                                                     |
=|  -----------  ----  -------------------------------------------------          |
=|                                                                                |
=|  BANKTEST     PF1   UP                                                         |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=| -------------------------------------------------------------------------------|
=| Application ===>                                                               |
^|                  ^
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.775 DEBUG d.g.z.s.Zos3270TerminalImpl - SENDING, PF1 to 3270 terminal term1,  updateId=term1-4
=| TERM0001                     SIMPLATFORM MAIN MENU                     18:40:14|
=| -------------------------------------------------------------------------------|
=|                                                                                |
=|  Application  PKey  Status                                                     |
=|  -----------  ----  -------------------------------------------------          |
=|                                                                                |
=|  BANKTEST     PF1   UP                                                         |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=| -------------------------------------------------------------------------------|
=| Application ===>                                                               |
^|                  ^
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.792 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-5
=| DFHZC2312 ***  WELCOME TO CICS  *** 18:40:14                                   |
^|^
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                     ******\  ******\  ******\   ******\(R)                     |
=|                    ********\ ******\ ********\ ********\                       |
=|                    **\\\\**\   **\\\ **\\\\**\ **\\\\**\                       |
=|                    **\    \\   **\   **\    \\ **\    \\                       |
=|                    **\         **\   **\       *******\                        |
=|                    **\         **\   **\        *******\                       |
=|                    **\         **\   **\         \\\\**\                       |
=|                    **\   **\   **\   **\   **\ **\   **\                       |
=|                    ********\ ******\ ********\ ********\                       |
=|                     ******\\ ******\  ******\\  ******\\                       |
=|                      \\\\\\   \\\\\\   \\\\\\    \\\\\\                        |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.804 DEBUG d.g.z.s.Zos3270TerminalImpl - SENDING, CLEAR to 3270 terminal term1,  updateId=term1-6
=|                                                                                |
^|^
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.948 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-7
=|                                                                                |
^|^
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.957 DEBUG d.g.z.s.Zos3270TerminalImpl - SENDING, ENTER to 3270 terminal term1,  updateId=term1-8
=|bank                                                                            |
^|    ^
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.973 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-9
=| CONNECTED                      SIMBANK MAIN MENU                       18:40:14|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
^|      ^
=|                                                                                |
=|   Options     Description        PFKey                                         |
=|   -------     ---------------------------------------------------------------  |
=|   BROWSE      Browse Accounts    PF1                                           |
=|   TRANSF      Transfer Money     PF4                                           |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:14.992 DEBUG d.g.z.s.Zos3270TerminalImpl - SENDING, PF1 to 3270 terminal term1,  updateId=term1-10
=| CONNECTED                      SIMBANK MAIN MENU                       18:40:14|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
^|      ^
=|                                                                                |
=|   Options     Description        PFKey                                         |
=|   -------     ---------------------------------------------------------------  |
=|   BROWSE      Browse Accounts    PF1                                           |
=|   TRANSF      Transfer Money     PF4                                           |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:15.008 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-11
=| CONNECTED                  SIMBANK ACCOUNT MENU                        18:40:14|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
=|                                                                                |
=|   Account Number  _________                                                    |
^|                   ^
=|   Sort Code                                                                    |
=|   Balance                                                                      |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:15.019 DEBUG d.g.z.s.Zos3270TerminalImpl - SENDING, ENTER to 3270 terminal term1,  updateId=term1-12
=| CONNECTED                  SIMBANK ACCOUNT MENU                        18:40:14|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
=|                                                                                |
=|   Account Number  123456789                                                    |
=|   Sort Code                                                                    |
^|                   ^
=|   Balance                                                                      |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:15.037 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-13
=| CONNECTED                  SIMBANK ACCOUNT MENU                        18:40:15|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
=|                                                                                |
=|   Account Number  123456789                                                    |
^|                   ^
=|   Sort Code       11-01-45                                                     |
=|   Balance         5562.42                                                      |
=|                                                                                |
=|   Account Found                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:15.048 DEBUG d.g.z.s.Zos3270TerminalImpl - SENDING, PF3 to 3270 terminal term1,  updateId=term1-14
=| CONNECTED                  SIMBANK ACCOUNT MENU                        18:40:15|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
=|                                                                                |
=|   Account Number  123456789                                                    |
^|                   ^
=|   Sort Code       11-01-45                                                     |
=|   Balance         5562.42                                                      |
=|                                                                                |
=|   Account Found                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:15.194 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-15
=| CONNECTED                      SIMBANK MAIN MENU                       18:40:15|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
^|      ^
=|                                                                                |
=|   Options     Description        PFKey                                         |
=|   -------     ---------------------------------------------------------------  |
=|   BROWSE      Browse Accounts    PF1                                           |
=|   TRANSF      Transfer Money     PF4                                           |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:15.195 DEBUG d.g.a.i.BundleResourcesImpl - Searching for artifact: resources/skeletons/testSkel.skel in bundle dev.galasa.simbank.tests
18/08/2020 18:40:15.474 DEBUG d.g.z.s.Zos3270TerminalImpl - SENDING, PF1 to 3270 terminal term1,  updateId=term1-16
=| CONNECTED                      SIMBANK MAIN MENU                       18:40:15|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
^|      ^
=|                                                                                |
=|   Options     Description        PFKey                                         |
=|   -------     ---------------------------------------------------------------  |
=|   BROWSE      Browse Accounts    PF1                                           |
=|   TRANSF      Transfer Money     PF4                                           |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:15.491 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-17
=| CONNECTED                  SIMBANK ACCOUNT MENU                        18:40:15|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
=|                                                                                |
=|   Account Number  _________                                                    |
^|                   ^
=|   Sort Code                                                                    |
=|   Balance                                                                      |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:15.501 DEBUG d.g.z.s.Zos3270TerminalImpl - SENDING, ENTER to 3270 terminal term1,  updateId=term1-18
=| CONNECTED                  SIMBANK ACCOUNT MENU                        18:40:15|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
=|                                                                                |
=|   Account Number  123456789                                                    |
=|   Sort Code                                                                    |
^|                   ^
=|   Balance                                                                      |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:15.515 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-19
=| CONNECTED                  SIMBANK ACCOUNT MENU                        18:40:15|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
=|                                                                                |
=|   Account Number  123456789                                                    |
^|                   ^
=|   Sort Code       11-01-45                                                     |
=|   Balance         6062.92                                                      |
=|                                                                                |
=|   Account Found                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:15.535 DEBUG d.g.z.s.Zos3270TerminalImpl - SENDING, PF3 to 3270 terminal term1,  updateId=term1-20
=| CONNECTED                  SIMBANK ACCOUNT MENU                        18:40:15|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
=|                                                                                |
=|   Account Number  123456789                                                    |
^|                   ^
=|   Sort Code       11-01-45                                                     |
=|   Balance         6062.92                                                      |
=|                                                                                |
=|   Account Found                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:15.555 DEBUG d.g.z.s.Zos3270TerminalImpl - RECEIVED update to 3270 terminal term1,  updateId=term1-21
=| CONNECTED                      SIMBANK MAIN MENU                       18:40:15|
=| -------------------------------------------------------------------------------|
=| ===>                                                                           |
^|      ^
=|                                                                                |
=|   Options     Description        PFKey                                         |
=|   -------     ---------------------------------------------------------------  |
=|   BROWSE      Browse Accounts    PF1                                           |
=|   TRANSF      Transfer Money     PF4                                           |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |
=|                                                                                |

18/08/2020 18:40:15.587 INFO  d.g.f.GenericMethodWrapper - Ending
----------------------- ****************************************************************************************************
----------------------- *** Passed - Test method dev.galasa.simbank.tests.BasicAccountCreditTest#updateAccountWebServiceTest,type=Test
----------------------- ****************************************************************************************************
18/08/2020 18:40:15.588 INFO  d.g.f.TestClassWrapper - Ending
----------------------- ****************************************************************************************************
----------------------- *** Passed - Test class dev.galasa.simbank.tests.BasicAccountCreditTest
----------------------- ****************************************************************************************************
18/08/2020 18:40:15.591 INFO  d.g.f.TestRunner - Starting Provision Stop phase
18/08/2020 18:40:15.595 INFO  d.g.f.TestRunner - Starting Provision Discard phase
18/08/2020 18:40:15.688 DEBUG dev.galasa.boot.felix.FelixFramework.stopFramework - Stopping Felix framework
18/08/2020 18:40:15.711 INFO  d.g.f.Framework - Framework service deactivated
18/08/2020 18:40:15.725 DEBUG dev.galasa.boot.felix.FelixFramework.stopFramework - Felix framework stopped
18/08/2020 18:40:15.725 INFO dev.galasa.boot.Launcher.launch - Boot complete

テスト失敗ケース

テストコードの最後のAssert部分を以下のように変更して、意図的にテスト失敗ケースを作ってみます。

BasicAccountCreditTest.java(抜粋)
        // Assert that the correct amount has been credited to the account
        //assertThat(newUserBalance).isEqualTo(userBalance.add(amount));
        assertThat(newUserBalance).isEqualTo(userBalance);

これを実行してみると、Consoleは以下のような出力結果となりました。

...
18/08/2020 18:45:00.737 INFO  d.g.f.GenericMethodWrapper - Ending
----------------------- ****************************************************************************************************
----------------------- *** Failed - Test method dev.galasa.simbank.tests.BasicAccountCreditTest#updateAccountWebServiceTest,type=Test
----------------------- ****************************************************************************************************
java.lang.AssertionError: 
Expecting:
 <6563.42>
to be equal to:
 <6062.92>
but was not.
	at dev.galasa.simbank.tests.BasicAccountCreditTest.updateAccountWebServiceTest(BasicAccountCreditTest.java:115)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at dev.galasa.framework.GenericMethodWrapper.invoke(GenericMethodWrapper.java:82)
	at dev.galasa.framework.TestMethodWrapper.invoke(TestMethodWrapper.java:56)
	at dev.galasa.framework.TestClassWrapper.runTestMethods(TestClassWrapper.java:182)
	at dev.galasa.framework.TestRunner.runTestClassWrapper(TestRunner.java:510)
	at dev.galasa.framework.TestRunner.runEnvironment(TestRunner.java:482)
	at dev.galasa.framework.TestRunner.createEnvironment(TestRunner.java:442)
	at dev.galasa.framework.TestRunner.generateEnvironment(TestRunner.java:415)
	at dev.galasa.framework.TestRunner.runTest(TestRunner.java:337)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at dev.galasa.boot.felix.FelixFramework.runTest(FelixFramework.java:220)
	at dev.galasa.boot.Launcher.launch(Launcher.java:152)
	at dev.galasa.boot.Launcher.main(Launcher.java:106)

18/08/2020 18:45:00.737 INFO  d.g.f.TestClassWrapper - Ending
----------------------- ****************************************************************************************************
----------------------- *** Failed - Test class dev.galasa.simbank.tests.BasicAccountCreditTest
----------------------- ****************************************************************************************************
18/08/2020 18:45:00.739 INFO  d.g.f.TestRunner - Starting Provision Stop phase
18/08/2020 18:45:00.741 INFO  d.g.f.TestRunner - Starting Provision Discard phase
18/08/2020 18:45:01.144 DEBUG dev.galasa.boot.felix.FelixFramework.stopFramework - Stopping Felix framework
18/08/2020 18:45:01.161 INFO  d.g.f.Framework - Framework service deactivated
18/08/2020 18:45:01.170 DEBUG dev.galasa.boot.felix.FelixFramework.stopFramework - Felix framework stopped
18/08/2020 18:45:01.170 INFO dev.galasa.boot.Launcher.launch - Boot complete

テスト結果の管理

Galasa Resultというビューを表示させると、過去のテスト結果が確認できます。
(ビューを表示させた時に、"Framework not initialised"というメッセージが出力される場合は、EclipseのメニューからGalasa - Initialise Galasa Frameworkを選択してInitialiseしてみてください)
image.png
テストケースをダブルクリックすると、詳細が表示されます。

テスト正常終了のケース
image.png

テスト失敗のケース
image.png

ログも残っているのであとからテストの詳細を確認することも可能です。

おわりに

上で実行した2つの例では、3270端末エミュレーターでの操作、Webサービス呼び出しのテストコードをJavaで記述してテストできることが確認できました。その他にもサンプルで提供されているBatchAccoutsOpenTest.javaでは、バッチプログラムを実行用のJCLをテストするコードが含まれています。
これらのアプリケーション呼び出しに必要な各種機能は、"Manager"と呼ばれる機能で実装されているようです。Manager機能の一覧は以下に記載があります。
参考: Managers
CICS関連だとCECIトランザクション(CICS端末から実行するEXEC CICS APIのインタープリター)を実行するためのManagerが提供されており、CECI経由でEXEC CICS LINKを発行してサブプログラム単位でのテストコードを書けるようです。素晴らしい!!!
この一覧をみると、"Deep integration testing for z/OS powered hybrid cloud applications"とうたっているだけにz/OS関連だけでなくDocker,Kubernetes,Linuxなど多岐に亘ったManager機能が挙げられています。2020年8月時点ではまだリリースされているものは少なく、Beta版、Alpha版のコードばかりの状態ですが、これからの拡張に期待したいところです。
また、今後はこのフレームワークは既存の開発支援ツール(IBM Developer for z/OSなど)にも組み込まれていくんじゃないかなーという期待も膨らみますね。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?