Generating test cases specifications for bpel compositions of web services using spin
Download
1 / 21

Generating test cases specifications for BPEL compositions of web services using SPIN - PowerPoint PPT Presentation


  • 67 Views
  • Uploaded on
  • Presentation posted in: General

Generating test cases specifications for BPEL compositions of web services using SPIN. José García-Fanjul, Javier Tuya, and Claudio de la Riva Pointner Stefan 13.01.2014. Contents. Introduction Specification of web services compositions with BPEL

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Generating test cases specifications for BPEL compositions of web services using SPIN ' - teness


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Generating test cases specifications for bpel compositions of web services using spin

Generating test cases specifications for BPEL compositions of web services using SPIN

José García-Fanjul, Javier Tuya, and Claudio de la Riva

Pointner Stefan

13.01.2014

AK Softwaretechnologie 1 WS 2013/14


Contents
Contents of web services using SPIN

  • Introduction

  • Specification of web services compositions with BPEL

  • Overview of the generation of test cases specifications

  • Transforming BPEL specifications into PROMELA

  • Using SPIN to generate test case specifications

  • Conclusion

AK Softwaretechnologie 1 WS 2013/14


Introduction
Introduction of web services using SPIN

  • Web as a Commercial Channel

  • Certain exchange protocol  XML

  • Software with XML as Input and Output

  •  XML based Web Services

    • Distributed

    • Asynchronous

    • Platform independent

    • Low coupled

AK Softwaretechnologie 1 WS 2013/14


Introduction1
Introduction of web services using SPIN

  • Compositions of Web Services

    • Business Process Execution Language (BPEL)

  • Testing Web Services

    • Asynchronous behavior

    • Distribution

    • Availability

    • Lack of user Interface

AK Softwaretechnologie 1 WS 2013/14


Specification of ws with bpel
Specification of of web services using SPINWS with BPEL

  • XML-Documents

    • Declarations

    • Specifications

  • Declarations

    • Partners

    • Variables

  • Specification

    • Basic Activities (Assign, Invoke, Receive)

    • Structured Activities (Sequence, Flow, While)

AK Softwaretechnologie 1 WS 2013/14


Bpel example
BPEL of web services using SPINExample

AK Softwaretechnologie 1 WS 2013/14


Generating test cases specifications for bpel compositions of web services using spin

< of web services using SPINprocessname="loanapproval" [...]>

<variables>

<variablename="riskAssessment"

messageType="asns:riskAssessmentMessage"/>

[...]

</variables>

<partners>

<partnername="customer" [...]/>

<partnername="assessor" [...]/>

<partnername="approver" [...]/>

</partners>

<flow>

<links>

<linkname="receive-to-assess"/>

<linkname="assess-to-setMessage"/> [...]

</links>

<receive name="receive1" partner="customer" [...]>

[...]

</receive>

...

AK Softwaretechnologie 1 WS 2013/14


Generating test cases specifications for bpel compositions of web services using spin

< of web services using SPINinvokename="invokeAssessor" partner="assessor"

portType="asns:riskAssessmentPT"

operation="check"

inputVariable="request"

outputVariable="riskAssessment">

<targetlinkName="receive-to-assess"/>

<sourcelinkName="assess-to-setMessage"

transitionCondition=

"bpws:getVariableData(’riskAssessment’,

’risk’)=’low’"/>

<sourcelinkName="assess-to-approval"

transitionCondition="

bpws:getVariableData(’riskAssessment’,

’risk’)!=’low’"/>

</invoke> [...]

</flow>

</process>

AK Softwaretechnologie 1 WS 2013/14


Business process
Business of web services using SPINProcess

AK Softwaretechnologie 1 WS 2013/14


Test case specification generation
Test case specification generation of web services using SPIN

  • Simple PromelaInterpreter – SPIN

    • LTL Formulae used for Property-specification

    • How it works?

      • SPIN searches all possible states within the model

      • Checks whether the properties hold

      • If not  gives a Counter Example

    • Generate Test Cases with SPIN

      • Transform Counter Example to Test Cases

  • Process/Protocol Meta Language – PROMELA

    • Describes models of distributed Systems

AK Softwaretechnologie 1 WS 2013/14


Test case specification generation1
Test case specification generation of web services using SPIN

  • Composition Under Test (CUT) is transformed into PROMELA

  • Transitions are identified

  • Mapping Transitions onto the Model

  • Transition expressed as LTL Property

  • Run SPIN with the Model and the Input LTL-Properties

  • Generate Test Cases with the produced Counter Example

AK Softwaretechnologie 1 WS 2013/14


Test case specification generation2
Test case specification generation of web services using SPIN

AK Softwaretechnologie 1 WS 2013/14


Transforming bpel specifications into promela
Transforming BPEL specifications into of web services using SPINPROMELA

  • PROMELA also includes BPEL-partners

  • BPEL portTypes transformed to PROMELA message channels

    • chanloanassessor_riskPort_IN = [QLENGTH] of {byte, byte, byte};

    • Input and Output channel

    • Message Types are declared as typedefs

  • Invoke Activity = !

  • Receive Activity = ?

AK Softwaretechnologie 1 WS 2013/14


Transforming bpel specifications into promela example
Transforming BPEL specifications into of web services using SPINPROMELA - Example

BPEL_loanApprovalPort_OUT! approvalInfo.accept

  • Sends a messagecontainingthe variable approvalInfo.accept

  • tochannelBPEL_loanApprovalPort_OUT

AK Softwaretechnologie 1 WS 2013/14


Transforming bpel specifications into promela web service
Transforming BPEL specifications into PROMELA of web services using SPIN– Web Service

  • If the BPEL specification has no reference to the data, it will be given an undefinedvalue

  • If the data is compared to a numerical constant, it will be given the value of the constant, a lower value and a higher third value

  • If the data is discrete, it will be given each of the discrete constants in the BPEL specification and a value different from them, called other

AK Softwaretechnologie 1 WS 2013/14


Transforming bpel specifications into promela transitions
Transforming BPEL specifications into of web services using SPINPROMELA – Transitions

  • BPEL is modelled in PROMELA

  • transitions are identified in the specification and are mapped within the model

  • Implicit Transitions

    • Invoke

    • Flow

    • While

  • Explicit Transitions

    • Are identified from link constructs

    • Explicitly transitions between activities (with same source or target)

AK Softwaretechnologie 1 WS 2013/14


Generating test cases specifications for bpel compositions of web services using spin

Using SPIN to generate test case specifications of web services using SPIN

  • Transition expressed as LTL Property

    • Unique Boolean variables tran1, tran2, tran3, …

    • Variable will get true in case of the transition being exercised by the model checker

    • The variable associated with a transition X is always false [] !tranX

    • Test Case stop if the property tranX is false

    • To get to end, change property to:

      • [] ( !tranX || !bpel_ends)

AK Softwaretechnologie 1 WS 2013/14


Using spin to generate test case specifications
Using SPIN to generate test case specifications of web services using SPIN

  • LTL property: [] ( !tran1 || !bpel_ends)

  • Example CounterExample for Transition 1, 3, 5:

    customer: request.amount = 3

    customer: BPEL_loanApprovalPort_IN!request

    bpel: request.amount<4

    bpel: tran1 = true

    bpel: loanassessor_riskAssessmentPort_IN!request

    assessor: riskAssessment.risk = low

    assessor: loanassessor_riskAssessmentPort_OUT! riskAssessment

    bpel: tran3 = true

    bpel: approvalInfo.accept = yes

    bpel: tran5 = true

    bpel: BPEL_loanApprovalPort_OUT!approvalInfo

    bpel: bpel_ends = true

  • Transformed into TestCase:

    • Input: Customer requests for an amount of 3 (less than four)

    • Input: Assessor sets risk to low

    • Output: reply to Customer is affirmative

AK Softwaretechnologie 1 WS 2013/14


Using spin to generate test case specifications1
Using SPIN to generate test case specifications of web services using SPIN

  • Full transition coverage with three executions:

    • {1, 3, 5}

    • {1, 4, 6}

    • {2, 6}

AK Softwaretechnologie 1 WS 2013/14


Conclusion
Conclusion of web services using SPIN

  • Generate test case specification from BPEL composition of web services

  • Method relies on SPIN Model Checker

    • Repeat execute to get a test suite for transition coverage

  • Independence from the particular implementation, only BPEL specification as input needed

AK Softwaretechnologie 1 WS 2013/14


Any questions
Any Questions? of web services using SPIN

José García-Fanjul, Javier Tuya, and Claudio de la Riva. Generating testcasesspecificationsfor BPEL compositionsof web servicesusing SPIN. In Antonia Bertolinoand Andrea Polini, editors, in Proceedingsof International Workshop on Web Services Modeling andTesting (WS-MaTe2006), pages 83-94, Palermo, Sicily, ITALY, June 9th 2006.

AK Softwaretechnologie 1 WS 2013/14


ad
  • Login