Giter VIP home page Giter VIP logo

digitalstate / camunda-spock-testing Goto Github PK

View Code? Open in Web Editor NEW
10.0 6.0 2.0 355 KB

Spock Framework Specification Testing / Unit Testing for Camunda BPM Engine/Processes

Home Page: https://forum.camunda.org/t/unit-testing-using-spock-framework-for-cucumber-style-testing-shared-engine-unit-testing-dmn-bpmn/5635?u=stephenott

License: MIT License

Groovy 93.12% JavaScript 6.88%
camunda spock-framework spock-tests groovy testing

camunda-spock-testing's People

Contributors

stephenott avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

camunda-spock-testing's Issues

Print list of variables from finished process

def processInstanceId = processInstance.getProcessInstanceId()
def historicVariableInstanceQuery = historyService().createHistoricVariableInstanceQuery().processInstanceId(processInstanceId)

historicVariableInstanceQuery.list().each{
    println "${it.getName()} : ${it.getTypeName()}: ${it.getClass()}"
}

Ability to keep engine hot?

Ability to keep core engine loaded to reduce test retry times

Deployment and Deletion of deployment would still occur

Assert variables list has specific variables and class types

import static org.hamcrest.CoreMatchers.is;
// import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasItems;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.both;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasProperty;

      def processInstanceId = processInstance.getProcessInstanceId()
      def historicVariableInstanceQuery = historyService().createHistoricVariableInstanceQuery().processInstanceId(processInstanceId)

      assertThat(historicVariableInstanceQuery.list(), hasItems(
                                                                both(hasProperty("name", equalTo("myJSON"))).and(instanceOf(org.camunda.bpm.engine.impl.persistence.entity.HistoricVariableInstanceEntity.class)),
                                                                both(hasProperty("name", equalTo("mySpinVar"))).and(instanceOf(org.camunda.bpm.engine.impl.persistence.entity.HistoricVariableInstanceEntity.class)),
                                                                ));

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.