GithubHelp home page GithubHelp logo

abap-ci-postman's Introduction

ABAP CI with Postman

Visit my blog about this repository --> https://medium.com/pacroy/continuous-integration-in-abap-3db48fc21028

Components

Name Description
abap_unit_coverage.postman_collection.json Postman collection to run ABAP Unit and check code coverage
abap_sci.postman_collection.json Postman collection to run ABAP Static Code Inspector (SCI) via ATC
NPL.postman_environment.json Environment variables
sap.groovy Groovy script for integrating into Jenkinsfile (see example)
SimpleRESTTest.postman_collection.json Postman collection to run API tests of abap-rest-api

Running with Postman

  1. Import all JSON files into Postman
  2. Bulk-edit imported environment variables NPL and add/update the following variables accordingly
host:vhcalnplci.dummy.nodomain
username:DEVELOPER
password:password
package:$REST_SIMPLE
coverage_min:80
  1. Test running the collection with environment NPL

* You can check the host and port via transaction SICF and select Test Service.
** You can also selectively run several packages, classes, or programs. Feel free to adjust the request XML. See object uri and type from ABAP Communication Log view in ADT.

Postman Collections

Name Description
abap_unit_coverage ABAP Unit and Code Coverage
abap_sci ABAP Static Code Inspector (via ATC)
SimpleRESTTest API Tests of abap-rest-api

Environment/Global Variables

Name Description
protocol http or https
port port of your SAP server*
client Your SAP golden client
client_test Your SAP client to run test against
coverage_type statement, branch, or procedure
coverage_maxlevel Number of depth level to cumulate and display coverage result
coverage_chklevel Number of depth level to check against minimum percentage. 0 means only top-level
exclusion Object to excluded from coverage check in JSON array of {"name": "", "type": "", "reason": ""}. See coverage result for actual name and type to exclude.
atc_variant SCI Variant to run the check
host hostname of your SAP server*
username User ID for logon
password Password for logon
package The package you want to run against, including its subpackages**
coverage_min Minimum coverage percentage to 'pass'
x-csrf-token Automatically filled during run

* You can check the host and port via transaction SICF and select Test Service.
** You can also selectively run several packages, classes, or programs. Feel free to adjust the request XML. See object uri and type from ABAP Communication Log view in ADT.

Running with Newman CLI

See example (Windows batch) commands in Groovy script.

abap-ci-postman's People

Contributors

pacroy avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

abap-ci-postman's Issues

Help using newman scripts

Hi @pacroy

I was reading your article about implementing a CI pipeline for SAP and I really liked it so, I started Implementing my own but I'm having a little trouble in the implementation.

I have been trying to use the scripts in my system but every time I run them I get a timeout, the thing is that I have SAP Development Tools instaled and I can run tests from Eclipse without problem, I thought my problem is the port I'm using so I traced my requests using the Resource Monitor and I got that my requests are being generated from <>:3300 port.

Also when I run SAP Gui the system tells me that the requests come from <>:3200.

I tried both this ports with no success and no good error, I also tried the port that came configured in the NPL file (8000) but that didn't work either.

Do you have like a guide for using this REST API? I'm a little lost I would like to test the most simple one to see if I can get a connection I tried http(s):///sap/bc/adt/discovery with both ports with no success so is there something I'm missing? somewhere to look? a guide to follow?

Thank you very much

Type error & assertion error Issue with AbapUnit Script

Hello,

Tried using the abapUnit script on Azure Devops Service to display Abapunit result. It will show some great outcomes, but got stuck with an error at this stage.

failure detail

  1. TypeError
    Cannot read property 'alert' of undefined
    at test-script
    inside "RunABAPUnit"

  2. AssertionError Status code is 200
    expected false to be truthy
    at assertion:0 in test-script
    inside "CheckCodeCoverage"
    ##[error]Cmd.exe exited with code '1'.
    Finishing: Run API Tests

need some suggestions over this. How can I solve this issue.

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.