Integrating Pega unit tests and scenario tests into build tools and pipelines

From PegaWiki
Integrating Pega unit tests and scenario tests into build tools and pipelines /
Revision as of 07:50, 28 October 2020 by User394 (talk | contribs) (first cut)

Jump to navigation Jump to search


Curator Assigned
Request to Publish
Description
Version as of
Application
Capability/Industry Area

↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ Please Read Below ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

Enter your content below. Use the basic wiki template that is provided to organize your content. After making your edits, add a summary comment that briefly describes your work, and then click "SAVE". To edit your content later, select the page from your "Watchlist" summary. If you can not find your article, search the design pattern title.

When your content is ready for publishing, next to the "Request to Publish" field above, type "Yes". A Curator then reviews and publishes the content, which might take up to 48 hours.

↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ The above text will be removed prior to being published ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

Introduction[edit]

Automated unit testing is a key stage of a continuous development and continuous integration model of application development. With continuous and thorough testing, issues are identified and fixed prior to releasing an application, which improves the application quality. Continuous and Automated unit testing is achieved with help of Build tools like Maven, Gradle etc. and Continuous Integration tools like Jenkins, Bamboo etc..

Integrating with Build tools[edit]

What is Build tool?[edit]

  • ·        Software build tools are used to automate the creation of executable applications from source code
  • ·        They script or automate a variety of tasks, such as downloading dependencies, compiling and packaging code, running tests, and deployment
  • ·        Examples of Build tools: ANT, MAVEN and GRADLE etc.

As gradle is widely used build tool, will look at how to execute Pega units and Pega scenario tests from sample gradle build script

Execution of Pega Units through gradle build tool[edit]

Pega Platform provides service to execute Pega unit test cases or test suites in your application and return results in xUnit format

Service comprises the following information

  • ·        Service name: PegaUnit Rule-Test-Unit-Case pzExecuteTests
  • ·        Service package: PegaUnit
  • ·        Endpoint:http://<yourapplicationURL>/prweb/PRRestService/PegaUnit/Rule-Test-Unit-Case/pzExecuteTests

               Add REST dependency to invoke Pega unit rest service from your gradle script like below

PegaUnitA.png

Use case examples[edit]

Provide a business example to help users understand the objective.

Before you begin[edit]

Is it necessary to plan anything in advance, or are external steps using other tools required to achieve the goal? If any specific configuration procedures (how-tos) exist on Pega Community pages, you can link to those assets here by providing the URL.

Process/Steps to achieve objective[edit]

What do individuals need to know to achieve the outcome? What do individuals need to know to achieve the outcome? Enter the precise steps to guide the user to achieving the desired outcome. Remember to always state where in the software the user must perform an action, before giving the action.

If “How To…” documents exist for specific configuration procedures please link (using the url) to those assets on the community **

Results[edit]

What do you expect the user to see or be able to do after they complete this design pattern?