marți, 19 aprilie 2011

SOAPUI testcases automatization

SOAPUI allows automatization of test.

It organizes as: TestSuite having TestCases having TestSteps. In TestSteps it can have among others: Properties, SoapRequests and TransferProperties.

Properties can be set also by using a text file. They are used like: ${username} in SoapRequests.

On SoapRequests can be added Assertions (verifications on expected results). Notice "Contains" and "Not Contains" ones.

TransferProperties allow to transfer values from one place to another, eg: get values from one test case response and use them in other test case request.

They consist of:

-source definition - from where to get value

-target definition - where to store it

-usage - see Note 1).

How to

Example of using SessionId in different requests:

-create a project from a wsdl, eg Soaptopupsuite53480.wsdl

-generate the TestSuite for all requests with 1 TestCase for each request

-double click on openSession Test Case

-add TestSteps: one of type Properties before the Test Step of type (Soap)Request and one of type PropertyTransfer after it (they can have any name)

-create a text file lines:

username=bdiaWeb1
password=bdiaWeb1!

-edit TestStep of type Properties and load it from file.

-edit TestStep of type PropertyTransfer and set as in Note 1).

-edit SoapRequest as:

${username}
${password}
274

-Add an Assertion of type "Contains" set to "sessionId"

-run the TestCase (not the TestStep)

-notice in TestSuite (!) property used for Transfer that the value is set with a session id.

-open TestCase setSubscriberInfo

-edit the TestStep of type (soap)Request

- fill like: ${#TestSuite#pt_sessionID}

- fill it with the other needed values

-run the TestCase - it runs successfully.

Links

-http://www.soapui.org/Getting-Started/functional-testing.html

-http://www.soapui.org/Functional-Testing/working-with-teststeps.html

-http://www.soapui.org/Scripting-Properties/working-with-properties.html

-http://www.soapui.org/Functional-Testing/transfering-property-values.html#The_PropertyTransfer_Editor

-http://www.soapui.org/Scripting-Properties/property-expansion.html



Notes

1)TransferPropertis example:

-add place where to store the value of property

-- click on Test Case - on left botton appear 2 tabs

-- click on Test Properties

-- add a name, eg pt_sessionID - nothing set to Value (we'll set at runtime)

-source definition:

Source: OpenSession request - property Response - field: declare namespace soapns='http://soaptopupsuite.eservglobal.com/';
//soapns:openSessionResponse[1]/session[1]/sessionId[1] (note: in SoapUI free need to manually edit)

for response:



341
?
932

-target definition:

Target: TestCase - property -the above property name, eg pt_sessionID

-usage : ${#TestSuite#pt_sessionID} (#TestSuite# is a predefined variable)

Howto Restart Gnome Panel

Howto Restart Gnome Panel
Thank you for simple
killall gnome-panel

marți, 12 aprilie 2011

Vizionare DVD in Ubuntu

Pentru ca in unele tari exista restrictii, Ubuntu nu ofera direct aceasta capabilitate. Insa se poate adauga:
-instalati niste librarii (firefox pe ubuntu a facut-o direct dand click pe link-urile in pagina)
Daca de acolo nu merge : sudo /usr/share/doc/libdvdread4/install-css.sh, continuati ce e mai jos:
-instalati libraria pentru decriptare
-puneti dvd-ul in unitate
-alegeti Movie Player si ...vizionare placuta.