Git Product home page Git Product logo

beassert's Introduction

beassert

This Java utility supports the testing of TIBCO BusinessEvents (BE) applications using JUnit. It implements BE catalog functions for assertion. It wraps most core assert functions from JUnit and Hamcrest, and implements some extensions for BE applications. This utility is used to demonstrate a BE test framework by the demo project DataTypeDemo.

Dependencies

This utility is used by the following 2 projects to demonstrate BE testing, so check them out to understand the usage of the assertion functions in this utility.

Maven

This is a Maven project, and so if Maven has not been installed on your system, you'll need to install Maven and Git as described in the beunit project.

Clone this project from GitHub

In the root folder of your workspace, clone the project using command

git clone https://github.com/yxuco/beassert.git

It should download the source code to the folder beassert in your workspace.

Install TIBCO BusinessEvents jars into local Maven repository

2 jars from TIBCO BusinesEvents installation are used by this utility.

  • $BE_HOME/lib/cep-common.jar
  • $BE_HOME/lib/cep-kernel.jar

They are not available in Maven Central, so, you need to install them into your local Maven repository using the following command:

mvn install:install-file -Dfile=$BE_HOME/lib/cep-common.jar -DgroupId=com.tibco.be \
-DartifactId=cep-common -Dversion=5.2.0 -Dpackaging=jar
mvn install:install-file -Dfile=$BE_HOME/lib/cep-kernel.jar -DgroupId=com.tibco.be \
-DartifactId=cep-kernel -Dversion=5.2.0 -Dpackaging=jar

Build the utility

In your workspace,

cd beassert
mvn clean install

The Maven build should be successful. This step downloads dependency packages from Maven Central, executes unit tests, and builds beassert-1.0.jar which is required to run the DataTypeDemo project.

The jar file is build in $WORKSPACE/beassert/target/beassert-1.0.jar, and it is also installed in your local Maven repository ~/.m2/repository/com/tibco/psg/beassert/1.0/beassert-1.0.jar.

Development using Eclipse

You may also edit and build it using either a standalone Eclipse, or the TIBCO BusinessEvents Studio.

  • Launch the TIBCO BusinessEvents Studio, for example.
  • Pulldown File menu and select Import...
  • In the Import dialog, select Existing Maven Projects, then click Next > button.
  • In the Import Maven Projects dialog, browse for Root Directory, select and open the beassert folder under your workspace.
  • Confirm that your-workspace/beassert is populated as the Root Directory, then click the Finish button.
  • In Package Explorer, highlight the root folder of the imported project beassert, and pulldown Window menu to open the Java Perspective.
  • In Package Explorer, open the src/test/java folder, select the file MatchAssertTest.java, right-click it and select the popup menu Run As -> JUnit Test.
  • You should see the famous Green/Red bar in the JUnit test panel.
  • Right-click root folder beassert and select the popup menu Run As -> Maven install, this will package and install the jar in your local Maven repository.

The author

Yueming is a Sr. Architect working at TIBCO Architecture Service Group.

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.