Git Product home page Git Product logo

truerocha / robot-framework-mainframe-3270-library Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marketsquare/robot-framework-mainframe-3270-library

0.0 2.0 0.0 186 KB

Altran developed and open source a test library for Robot Framework to enable to create automated test scripts to test IBM Mainframe 3270.

License: MIT License

Dockerfile 1.55% Python 77.94% Shell 0.28% RobotFramework 20.23%

robot-framework-mainframe-3270-library's Introduction

Mainframe3270Library

Introduction

Mainframe3270 is a library for Robot Framework based on py3270 project, a Python interface to x3270, an IBM 3270 terminal emulator. It provides an API to a x3270 or s3270 subprocess.

Instalation

In order to use this library you need to install the x3270 project. More information on the Wiki page of this project.

Example

*** Settings ***
Library           Mainframe3270

*** Test Cases ***
Example
    Open Connection    Hostname    LUname
    Change Wait Time    0.9
    Set Screenshot Folder    C:\\Temp\\IMG
    ${value}    Read    3    10    17
    Page Should Contain String    ENTER APPLICATION
    Write Bare    applicationname
    Send Enter
    Take Screenshot
    Close Connection

Importing

Arguments:

  • visible = True
  • timeout = 30
  • wait_time = 0.5
  • img_folder = .

You can change to hide the emulator screen set the argument visible=${False}

To change the wait_time see Change Wait Time, to change the img_folder see the Set Screenshot Folder and to change the timeout see the Change Timeout keyword.

Running with Docker

Docker image contains everything that's needed to run the Mainframe tests. Currently image is not pushed to Docker hub, so steps to use it

  • Build image:
    • Python 2: docker image build --build-arg PYTHON_MAJOR=2 -t mainframe3270-p2 .
    • Python 3: docker image build --build-arg PYTHON_MAJOR=3 -t mainframe3270-p3 .
  • Run all tests: docker container run --rm -it mainframe3270-p<PYTHON_MAJOR>

Reports are stored to /reports. Those can be get to host by mapping it as volume. E.g. in Windows CMD with current directory mounting command is docker container run --rm -it -v %cd%\reports:/reports mainframe3270-p<PYTHON_MAJOR>

If wanting to run just single/specific tests, it can be mentioned at the end of command. Currently only single argument can be given, so multiple tests can be given with wildcards like: docker container run --rm -it -v %cd%\reports:/reports mainframe3270-p<PYTHON_MAJOR> *PF* (this executes just single tests, as PF is mentioned only in one).

When developing tests, also source code and tests can be mounted to container. Command to run tests using current sources with Python 3 (without need to recreate container all the time):

  • Windows: docker container run --rm -it -v %cd%\reports:/reports -v %cd%\tests:/tests -v %cd%\source:/usr/local/lib/python3.7/site-packages/Mainframe3270 mainframe3270-p3 (reports -dir needs to be created beforehand)
  • Linux/MacOSX: docker container run --rm -it -v $(pwd)/reports:/reports -v $(pwd)/tests:/tests -v $(pwd)/source:/usr/local/lib/python3.7/site-packages/Mainframe3270 mainframe3270-p3

Notes

By default the import set the visible argument to true, on this option the py3270 is running the wc3270.exe, but is you set the visible to false, the py3270 will run the ws3270.exe.

Keyword Documentation

You can find the keywords documentation here

WIKI

For more information visit this repository Wiki.

Authors

  • Altran - Altran Web Site
  • Samuel Cabral
  • Joao Gomes
  • Bruno Calado
  • Ricardo Morgado

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

robot-framework-mainframe-3270-library's People

Contributors

samuelpcabral avatar hi-fi avatar altranpt avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.