Giter Club home page Giter Club logo

cobol-check's Introduction

Cobol Check

Cobol Check provides fine-grained unit testing/checking for Cobol at the same conceptual level of detail as unit testing frameworks for other languages, such as Python, Ruby, C#, and Java.

Feature overview

  • Fine-grained assertions
  • Stubs and mocks
  • Mock perform verification
  • Test result report in JUnit format and HTML
  • And much more

Thanks!

A big thank you to Vicom Infinity for kindly providing a test z/OS environment for the project!

Another thank you, goes towards Bankdata, for major contributions to the project.

Immediate needs

As of March 2022 we could use help with:

  • 1 or 2 additional team members - interns OK.
  • review of localized messages by native speakers and creation of additional localized message files.

Downloads

Version 0.2.10 pre-release is available!

If you want source code, you can clone the repository or download a compressed archive(currently outdated) from here.

Cobol Check is also a Visual Studio Code extension. Download it in the Extensions tab in VS Code or take a look here.

Why?

The industry is experiencing a resurgence in interest in Cobol, both to support existing applications and to take advantage of the continuing evolution of the zSeries platform. Commercial unit testing tools for Cobol are able to exercise code at the level of a whole load module, but cannot exercise individual Cobol paragraphs in isolation. That limitation means we cannot achieve the same degree of granularity in microtests as we can when working in other languages, such as Java, Kotlin, C#, Python, or Ruby.

Given that capability, we might anticipate some of the same effects on the design of Cobol code as we see in the design of code in other languages, when fine-grained microtesting is used. These include factors like modularity, smaller source units, closer alignment with basic software design guidelines such as separation of concerns and single responsibility, and so forth.

As much of the work in this space will involve support for existing code bases, we might also anticipate that incremental refactoring will become easier once we have a safety net of fine-grained examples in place. We can apply the same techniques we use to improve the design of existing code in other languages.

Installing, Using, Contributing

Please see the wiki for more information.

Target platforms

We want to enable Cobol developers to write and run fine-grained unit checks on as many platforms as are feasible. Please see the list of certified user platform on the wiki.

Related projects

Governance

This project is part of the Open Mainframe Project.

Reporting Issues

To report a problem or request a feature, please open an issue.

cobol-check's People

Contributors

akashkumar7902 avatar cmorgan-mercurial-solutions avatar dakaa16 avatar davenicolette avatar ghettokiwi avatar gitmensch avatar issacto avatar neopragma avatar oakmount1966 avatar oakmount66 avatar rune-christensen avatar smorg75 avatar tanto259 avatar thomasnellemann avatar thomasnellemann-bd avatar wildtbrian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cobol-check's Issues

Expand copybooks

Optionally expand copybooks, with support for nested COPY statements and COPY REPLACING. This functionality was not included in the proof of concept but it is necessary in some circumstances. We consider it part of the initial functionality.

Create and test z/OS developer and test setups

Create and test developer and test setups for z/OS and write the documentation. This will require help from external supporters of the project who can provide access to a z/OS system.

Project documentation

Start creating project documentation and establish a reasonable structure for it. Use the project wiki on Github for this.

Execute a paragraph in isolation

Add support for running a single paragraph in a Cobol program. This is a re-implementation of proof of concept functionality.

Apply to the Open Mainframe Project

Work with John Mertic, who reached out to express interest in the project, who has offered to shepherd us through the application process.

Mock or stub a CICS resource and provide fake results

This is a re-implementation of proof of concept functionality that will be designed differently. The proof of concept mocks specific EXEC CICS commands. The new implementation will mock or stub the CICS resource, and allow substitute results, EIBRESP/EIBRESP2 codes, and conditions for the test case.

Mock a batch file READ and provide a fake record

Stub access to a file in batch mode and populate Data Division items with values for the test case. This is a re-implementation of proof of concept functionality that involves minor redesign of the solution.

Test a paragraph in isolation

Set preconditions (Data Division item values), execute paragraph in isolation, check postconditions (Data Division item values). This is a re-implementation of proof of concept functionality.

Perform one-time setup at the start of a test suite

We want to be able to do a one time setup, before a test suite is run.
This is the implementation of the BEFORE-ALL keyword and functionality.
Unlike BEFORE-EACH, which runs before every testcase, BEFORE-EACH, should only run once.

Set up static code analysis

Set up support for static code analysis. Try Sonarcloud first. If that isn't suitable, find another solution.

Stub a paragraph

Stub a paragraph on which the paragraph under test depends. This is a re-implementation of proof of concept functionality.

Messages not honoring change in Locale

Changing the Locale after starting Cobol Check has no effect. Messages continue to be emitted in the Locale that was set as default at the time the program started.

Support parameterized test cases

This functionality was not included in the proof of concept but was always in plan. We consider it fundamental and include it in the re-implementation milestone.

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.