Git Product home page Git Product logo

chandusekhar / k2field.utilities.wf.unittesting Goto Github PK

View Code? Open in Web Editor NEW

This project forked from k2field/k2field.utilities.wf.unittesting

0.0 1.0 0.0 1.76 MB

A way of using configured xml files to automate testing of K2 Process Instances, including actioning a task as another user and IPCs. It has a UI which logs each activity (taken or not taken), displays new K2 errors, and can test the values of K2 process/activity datafields. As a bonus it can also display the viewflow in a new tab in the UI.

C# 100.00%

k2field.utilities.wf.unittesting's Introduction

===============================
So what is it?
===============================

It is a way of using configured xml files to automate testing of K2 Process Instances, including actioning a task as another user and IPCs. It has a UI which logs each activity (taken or not taken), displays new K2 errors, and can test the values of K2 process/activity datafields. As a bonus it can also display the viewflow in a new tab in the UI.

===============================
So can I see it in action?
===============================

Yes. I have a brief video with no sound at http://screencast.com/t/dpQvRYHo.
Also the project has an [example workflow](/Testing/SampleWorkflow/K2Field.Utilities.Testing.SampleWorkflow.sln) 
Steps to get this working fast:
•	Open up the Sample workflow solution on github and deploy
•	Open up the [Workflow Testing Solution](/Testing/WF/K2Field.Utilities.Testing.WF.sln), set the UI project to be the start-up project and run it.
•	Change the Viewflow URL and K2 server settings to match your environment and click “Start Tests”
![Example Screenshot](https://github.com/k2workflow/K2Field.Utilities.WF.UnitTesting/blob/master/SampleScreenshot1.png?raw=true)
 
===============================
Isn’t this already on K2Underground?
===============================

Yes it’s based on Adam Castle’s excellent [k2underground project](http://www.k2underground.com/groups/workflow_testing_tools/default.aspx). I’ve revamped the xml schema and added new features. I’ve also forked off his helper project, so it is a little bit difficult to merge back in. We will work on it. The old xml schema should still work.

===============================
Is this documented?
===============================

A bit. The example should give you enough examples to get going with. I’ve tried to keep [the documentation](/WorkflowTesting.docx) up to date with all the new features I’ve added. 

===============================
And what are these new features?
===============================

Mainly the ability to re-use process/activity files. The example solution has a Travel Process and an Advanced Approval Process that has its own set of tests. These are then called from the Travel process tests.
Also
•	Check blackpearl’s error log count and show new errors
•	Check that paths are taken
•	Check that paths are not taken

===============================
So where has this been used?
===============================

I use it all the time on any K2 Process project. It means I never have to check the K2 workspace or process portals. It works best when workflows are extremely de-coupled (see below), but you can also hook in any call to a .Net assembly either before or after every activity.
I used it pretty extensively at a Lloyd's syndicate. They had 12+ processes all IPC dependant on each other and the most insane complexity I’ve ever seen in a workflow app, as the whole business process could be started at 3 different places and the 3 main paths all had to be taken to complete the process. **It would not have been possible to completely test all paths without this tool.** The links between 50 xml files got so complex I had to visualise them in Google docs:
![Example complexity](\ComplexXMLstructure.png)

===============================
Is it dependent on anything?
===============================
Yes it is dependent on [Core Helper project](https://github.com/k2workflow/K2Field.Helpers). To enable a quick start, I have compiled the most recent version of this and included the assembly in a dependencies sub folder. Please let me know if you have suggestions of another way to do this.


=============================== 
Questions?
===============================

As normal, use github to request features and email me if you are stuck.

k2field.utilities.wf.unittesting's People

Contributors

123lee avatar lancehilliard avatar

Watchers

James Cloos avatar

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.