Sunday, February 10, 2013

Need a 50 GB free cloud space? This is what you need to do..

Box.com is very similar to DropBox.com or anyother site which gives free cloud space for its users.





Dell has a special promo to attract its customers and offers a free 50 GB cloud space in box.com for all new Dell customers. Fortunately, you need not own a new Dell PC and the promo works for anyone across the globe. We guess Box.com had made the promo public to attract the existing Dropbox users, so that they will start using Box.com.

Dropbox offers only 2GB of initial free cloud space and the rest 14GB free space can be earned by referals and liking/tweeting about the dropbox pages in the Social websites.

A tiny catch:

Though you get a free 50GB cloud space, the maximum file size that you can upload at a time is 250MB. Yes. 250MB is the file size limit. This is sad but you can still pay to box.com and upgrade it from 250MB to 2GB for 15$/Month.

So how I get my 50GB free cloud space?

You cannot simply login to Box.com and click on sign up. You might get only a maximum of 5GB cloud space instead of the free 50GB.

Click on the below link to earn free 50GB cloud space. Thanks to Dell and Box.com for this promotion.

http://goo.gl/NZWMO

Your comments are most welcomed.

Thanks,
TechCrook team.

Monday, December 17, 2012

On-Demand Webinar: Let's Get Groovy

Dear Readers,
      Smart Bear's "Let's Get Groovy" webinar happened last week. The webinar was about Groovy Scripting in SoapUI and was aimed at people with little or no experience of Groovy.




More than 900 participated in the webinar and tons of questions on SOAP UI and Groovy scripting were posted.

The presentation featured an introduction to Groovy scripting in SoapUI. If you were unable to attend or would like to view it again, just click the below link.

Click here to watch the webinar video.

The examples that was used in this webinar is available in the below link.

Click here for the tips & tricks and examples.

Thanks,
TechCrook Team






Saturday, November 24, 2012

Groovy Scripting - Turn SOAP UI into a complete Automation Tool

Hello Readers,

    Greetings from TechCrooks.com. Today, we will learn about Groovy Scripting and how it can power the SOAP UI Tool, one of the leading Web Services/ API testing tools in the market.

You might be aware of various Web services testing tools like ParaSoft SOATest, SOAP Sonar, Itko LISA, etc. Smart Bear's SOAP UI Pro tool is one among the services testing tools, which has few amazing features like easier property/data transfer, running the scripts in multiple environment/servers, Data Source feature for data parametrization, etc..

SOAP UI Pro tool costs close to 350$ for each of the stand alone licences for a period of 1 year. But the beta version of the tool is free to use with a limited features. But have you ever wondered if you can get all those cool features that you have in the pro version of the tool in beta? If yes, we like your thinking. The tool allows the user to create his/her own scripts using Java/Groovy. Though not all the features can be achieved in beta, most of them can be created using the scripting support that SOAP UI beta provides for free.

"Oh come on. Don't ask me to learn a language now." See, we read your mind. :) Need not panic. Groovy is one of the best scripting languages used to manipulate with the XMLs. You need to have basic Java Knowledge to understand the sytax and data types of the script. Yes, just the basic knowledge.

In this post, we will just see how groovy scripting can be used with SOAP UI beta 4.5.1 tool.

Below are few of the features that you can achieve using Groovy Scripts. We are considering that you already have a little knowledge on the tool.

Features:

1)Data/Property transfers:

Say we have a scenario where we have to pass a value from the response of one method to the request of next method to continue a process.
Eg: Search for a product, and make a payment for a particular product ID from the search product response.

Below is the groovy script to achieve the same:


java.lang.Integer
java.lang.String

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );

// create holder for Search response

def holder = groovyUtils.getXmlHolder( 'SearchProducts_XMLRequest#ResponseAsXml' );

// create a variable productID to temporarily save the value and provide a valid XPath

def productID = holder.getNodeValue( '//ShoppingSearchResponse[1]/ShoppingSearchResults[1]/Products[1]/Camera[1]/@id' );
log.info('The product ID is : ' + productID );

//Saving the value of productID in the Global properties

com.eviware.soapui.SoapUI.globalProperties.setPropertyValue( 'PropTransferSearchproductID', productID);


Now the same Global properties value will have the required product ID from the search product response.

The same can be accessed in the Payment product request-> Product Id tag. Below is the implementation:

<productID>${#Global#PropTransferSearchproductID}</productID>

Instead of doing the saving the required value on a global level, it can be saved on various other levels. We will discuss the same in the next point.

2)Assigning and Accessing the property values at various levels:

The properties can be assigned and accessed at 4 different levels in SOAP UI tool.

A)At Global level - A property value saved at a global level can be accessed by any of projects in the Soap UI workspace.

Soap UI Global properties can be accessed from the File Menu->Preferences option->Global Properties tab.




Assigning:
com.eviware.soapui.SoapUI.globalProperties.setPropertyValue( 'PropTransferSearchproductID', productID);

Accessing:(In a XML)
<productID>${#Global#PropTransferSearchproductID}</productID>
Accessing:(In a Groovy)
def GlobalproductID = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( 'PropTransferSearchproductID');
(or)

def GlobalproductID = context.expand( '${#Global#PropTransferSearchproductID}' );

SOAP UI Global properties are mostly used to drive the endpoint or WSDL, Authentication details for Basic HTTP Authentication, DB Authentication, DB Schema name, etc.. which will be the same for the entire workspace.

B)At Project level - A property value saved at a project level can be accessed by all the testsuites and test cases under that project.



Assigning:
testRunner.testCase.testSuite.project.setPropertyValue( 'PropTransferSearchproductID', productID);


Accessing:(In XML)
<productID>${#Project#PropTransferSearchproductID}</productID>

Accessing:(In a Groovy)
def ProjectproductID = testRunner.testCase.testSuite.project.getPropertyValue( 'PropTransferSearchproductID');

C)At TestSuite level - A property value saved at a testsuite level can be accessed by all the testcases under the designated testsuite.

Assigning:
testRunner.testCase.testSuite.setPropertyValue( 'PropTransferSearchproductID', productID);

Accessing:(In XML)
<productID>${#TestSuite#PropTransferSearchproductID}</productID>
Accessing:(In a Groovy)
def TestSuiteproductID = testRunner.testCase.testSuite.getPropertyValue( 'PropTransferSearchproductID');

D)At TestCase level - A property value saved at a testcase level can be accessed only by that particular test case.

Assigning:
testRunner.testCase.setPropertyValue( 'PropTransferSearchproductID', productID);

Accessing:(In XML)
<productID>${#TestCase#PropTransferSearchproductID}</productID>
Accessing:(In a Groovy)
 def TestCaseproductID = testRunner.testCase.getPropertyValue( 'PropTransferSearchproductID'); 

SOAP UI also allows the user to add a "Properties test step" which is similar to the testcase level property. All the Test Steps under the test case can access al the property values from a Property test step.




Assigning:
def propertyStep = testRunner.setTestCase().getTestSuite().getTestCaseByName('001_testcasename').getTestStepByName('TestStepName')

propertyStep.setPropertyValue('PropTransferSearchproductID', value);


Accessing:(In XML)
<productID>${#PropertiesStepName#PropTransferSearchproductID</productID>

Accessing:(In a Groovy)
def Value = context.expand( '${PropertiesStepName#PropTransferSearchproductID}' );

(or)

 def propertyStep = testRunner.getTestCase().getTestSuite().getTestCaseByName('001_testcasename').getTestStepByName('TestStepName')

def RowStartValue = propertyStep.getPropertyValue('PropTransferSearchproductID');

3)Controlling the flow of execution:

The flow of execution can be controlled by adding a condition in groovy script and forcing the control to go to a particular script. Below is a sample script for the same,

def envvalue = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( 'environment' )
public int env = envvalue;
env = env - 48
if (env.value == 1)
{
log.info 'Execution on First Environment : Completed'
temp = '2';
com.eviware.soapui.SoapUI.globalProperties.setPropertyValue( 'environment', temp);
testRunner.gotoStepByName( 'ABC_STEP');
}
else if (env.value == 2)
{
log.info 'Execution on SecondEnvironment : Completed'
temp = '3';
com.eviware.soapui.SoapUI.globalProperties.setPropertyValue( 'environment', temp);
testRunner.gotoStepByName( 'XYZ_STEP')
}

4)Reading and manipulating the WSDL's at runtime:

The WSDL's or End point URL's can be accessed at runtime, and the same can be manipulated. Below is a sample script which tells us how to compare two WSDL URL's.
def TextInWSDL = 'Product'
def EndPointURL = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( 'EndPointURL')

log.info('EndPointURL from Global: ' +  EndPointURL );
def newEndPointURL = EndPointURL.replace('.', '')
newEndPointURL = newEndPointURL.replace('http://', '')
log.info('NewEndPointURL: ' +  newEndPointURL );
def StringAppend = newEndPointURL.getAt(6) + newEndPointURL.getAt(7) + newEndPointURL.getAt(8) + newEndPointURL.getAt(9)
log.info('StringAppend: ' +  StringAppend);
log.info('TextInWSDL: ' +  TextInWSDL + StringAppend);
com.eviware.soapui.SoapUI.globalProperties.setPropertyValue( 'PropTransferBookingIDFormat', TextInWSDL + StringAppend);

Note: For this script to work, the Endpoint URL in your SOAP UI Tool should have been parametrized like ${#Global#EndPointURL}.

5)Running the scripts in multiple environments:

Instead of creating two set of scripts to run on two Endpoint URL's (or two different servers), groovy gives a flexibility to run the same set of scripts on multiple environments.
To Achieve this, we will be making use of the SOAP UI tool's multiple environment feature which is applicable only from SOAP UI v4.5.0 or later.

This is a 3 step process:

1)You have to set a dummy value to your enviroment:
2)You have to select the required environment:
3)You have to loop back to the next environment:

Setting a dummy value for the environment variable:
import java.lang.String;
import java.lang.Integer;

temp = '1';
com.eviware.soapui.SoapUI.globalProperties.setPropertyValue( 'environment', temp);

Selecting Environment at Run time:
def GlobalEnvironmentID = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( 'Environment');
log.info GlobalEnvironmentID

if (GlobalEnvironmentID .value == 1)
{
testRunner.testCase.testSuite.project.setActiveEnvironment('FirstEnvironment')
log.info 'Running the test on QA_STABLE Build'
}
else if (GlobalEnvironmentID .value == 2)
{
testRunner.testCase.testSuite.project.setActiveEnvironment('SecondEnvironment')
}


Looping back to the next Environment:
 def envvalue = com.eviware.soapui.SoapUI.globalProperties.getPropertyValue( 'environment' )
public int env = envvalue;
env = env - 48
if (env.value == 1)
{
log.info 'Execution on FirstEnvironment : Completed'
temp = '2';
com.eviware.soapui.SoapUI.globalProperties.setPropertyValue( 'environment', temp);
testRunner.gotoStepByName( 'FIRST_TEST_STEP');
}
else if (env.value == 2)
{
log.info 'Execution on SecondEnvironment : Completed'
temp = '3';
com.eviware.soapui.SoapUI.globalProperties.setPropertyValue( 'environment', temp);
testRunner.gotoStepByName( 'LAST_TEST_STEP')
}


6)Groovy Assertions:

SOAP UI Generic assertions cannot assess complex scenarios which include various conditions. Hence a script assertion have to be used.

To access a testcase property in a script assertion:

def testCaseProperty = messageExchange.modelItem.testStep.testCase.getPropertyValue( 'PropertyName' )

Sample Assertion Script:
//Get the XMLStepname
def XMLStepname = messageExchange.modelItem.testStep.getName()
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );
// create holder for the response
def holder = groovyUtils.getXmlHolder( XMLStepname + '#ResponseAsXml' );

def xml = new XmlSlurper().parseText(holder.getXml())
// Find the Tag Name and attribute name
def tag= xml.depthFirst().findAll { it.name() == 'TagName' && it.@type == 'AttributeName' }
//Count the total number of tags
def PropertyName= tag.size()
log.info PropertyName


assert PropertyName == 1

Will return an assert value true or false, true if 'PropertyName = 1 and false if PropertyName = any other value'
7)Groovy Data Source loop:

A groovy data source is a custom data source to iterate or parametrize values. Below is a sample script to create a groovy data source:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def projectPath = groovyUtils.projectPath
def folderName = projectPath + '/testData'
def row = testRunner.testCase.testSteps['DataSource'].currentRow
def allFiles = []
new File( folderName ).eachFile() { file ->
if( file.name =~ /.txt/ )
{
allFiles.add( file.name )  }
}
if ( (row + 1) <= allFiles.size )
{
// output to the TestStep property called inputData
result['inputData'] = new File( folderName + '/' + allFiles[row] ).text
} 

We have not really implemented the groovy data source and data source loop. The above code is just an extract from the official SOAP UI site. For more information on this, please click here.


8)Renaming a request in SOAP workspace at run time:

Below groovy script uses a .setName function to set a test step name at run time.

for( testCase in testRunner.testCase.testSuite.getTestCaseList() )
{
  for( testStep in testCase.getTestStepList() )
    {
      String TestStepName = testStep.getLabel()
      if( testCase.getLabel() == TestCaseName )
       {
        if (TestStepName =~ 'XML1')
         {
           testStep.setName('ABC')
         }
        else if (TestStepName =~ 'XML2')
         {
            testStep.setName('XYZ')
         }
       }
     }
}

Few of the awesome cool features like controlling the flow of execution, Conditional script assertions, Switching Environment at runtime, etc. are available to the tool only through groovy scripting.

Though all these good to have features can be achieved, SOAP UI Pro always allows the user to do things in the most easiest way. To mention a few, XPATH Quert, property transfer using the property transfer environment, support for multiple environments, a datasource step with click and extract data, etc.

Thanks,
Swaminathan.B

Your feedback and comments are most welcomed.

Tuesday, November 13, 2012

IOS 6 - Apple Maps replacement Apps in App Store

Best Map apps in the App Store for all the iOS devices:

Many of you might have updated your iDevices from iOS 5.x to iOS 6. The one major feature which everyone would have lost after upgrading is the Google Maps app, the market leader in maps. Google and Nokia do have the most accurate maps for mobile devices as they are in the navigation market for more than 4 years now. Apple discontinued the Google Maps feature for various reasons and planned to provide the Apple Maps as the stock maps for all the iOS devices which runs iOS 6 or later. Since Apple is just at the entry level in the maps market, it cannot provide maps as accurate as its competitors in a day. So we will have to wait for few more days for Apple to fix the maps and provide route planning for non-supported countries in iOS 6.

People even downgraded their iOS devices to iOS 5 just for the getting back the Google maps(You need to have your device's SHSH blobs saved). So you might be wondering if there is a way for you to get Google maps in your iOS 6 devices.

Answer: Yes. You can still get Google maps from few vendors but with a slightly different UI which we had in iOS 5.x.

I reviewed quite a lot of paid and free map apps ever since I lost my pretty good Google maps. I even tried the maps.google.com and maps.nokia.com bookmarks but was not quite satisfied with the interface. After a thorough review I found two best map apps which can be a replacement for Google maps in iOS 6.

1) Sparkling Maps : Paid App (0.99$ or INR 55)

The Sparkling maps apps (Powered by Google) provides an almost native iOS 5.x Google maps user interface. It is pretty user friendly to Search for a location and plan routes.

 

It also offers a street view (Long press on any location in the map), which is pretty quick and responsive. If your location does not have a street view, the nearest street view could also be found.

The most amazing feature of this application is the Turn-by-Turn voice navigation. Very crisp, clear and accurate. We feel that this application is a paid app just because of this cool feature which even Google did not offer in the iOS 5.x maps.


Few other features of this app includes POI(Point of Interest) search like nearby Restaurants, ATM, Banks, etc.., Satellite and Hybrid map views.


Cons and Required bug fixes / Required Feature updates: 

The version 1.1 of the sparkling maps was considered for a review and the following were observed.

1)The font size is very minute even at the maximum Zoom-In levels and it decreases the readability while driving (Can't purely mock on Turn-By-Turn Voice guidance)

2)After planning a route, the user cannot scroll and check the route completely. The map automatically repositions to the user's current location. (The customer support team reported that this fix is already made in the next version and the app is submitted for Apple review).

3)When a search is made and though multiple locations are available for the search made, only one location is displayed in this app. (This could be overcome by the auto suggest feature which will be available in the next version of the app).

4)A location bookmarking feature is missing.

5)A Direction from location and To location features are missing.(The same will be available in the next version as per the support team).

Also, in the upcoming version of the app, the development team had made this a universal app so that it will fit the iPad larger display.

The team also has plans of redesigning the Turn-By-Turn route guidance so that it looks more like an Apple Maps Turn by turn feature.

 Since this is the most closest app that one can get to the Native iOS 5.x Google maps with a Turn by turn voice guidance, the price of the app might be hiked up soon. This is just our prediction. Hence the suggestion is before the app price hikes up, download and install the app and wait for the new features and bug fixes.

Download URL : Click here

 

2) Fine Maps : Free App

Fine maps is one of the finest map apps in the app store with the detailed map information from Google. 

This app has basic user friendly controls to search a location, add a book mark, plan a route, view the Street view etc..

The way one can plan a route is pretty different, compared to the other map applications in the store. The user is expected to touch the from (source point) and the to (destination point) in the map. This is quite good if both the source and destination are available in the same screen. Else, the user has to scroll, find out the places and touch the source and destination. We felt this is messy.

The best thing about this app is, you can toggle between the Google maps / the stock iOS 6 Apple maps in the settings menu.

The user can also get a Satellite view, Hybrid view or a Terrain view in this application. If your city/country supports traffic, you can enable the same in the settings menu(Have not tried it as it does not support in my country).

There is a "Scale feature" which measures the distance between the two points the user selects in the map. The user can also use a pencil feature to mark the required points in the map.


If you wish to remove the advertisements which comes as a banner in the top of the window, you would have to pay for the app. (1.99$ or INR 110)

The search is pretty fast and accurate with an auto suggest feature and this app really offers more than what you can expect.

Cons:

1) Does not support Turn-By-Turn voice guidance. (yeah, you cannot expect the same in a free app).
2) Difficult to plan a route since you have to touch the source and destination points.

Download URL : Click here

 

There are no updates about the Google maps for App Store from Google and rumors state that Apple might not approve even though Google had already submitted the maps to app store due to market reasons.

 

Though there are rumors that there are Cydia repos to install Google maps on a iOS 6 device after Jail-breaking it, it is wise for us all to wait for apple to create a robust Apple maps application since it will be the only app which will be tightly coupled with the other applications like SIRI, Facebook etc..

Thanks,
Your comments are most welcomed.
-Swami