SoapUI – Properties using Groovy

//*CODE STARTS
//To GET THE TIME STAMP IN DIFFERENT FORMATS
//*
 
def sdf = new java.text.SimpleDateFormat("yyyy-MM-dd hh:mm:ss")
log.info (sdf.format( new Date()))
 
def dff = new java.text.SimpleDateFormat("yyyy-dd-MM hh:mm:ss")
log.info (dff.format( new Date()))
 
def dtt = new java.text.SimpleDateFormat("yyyy-dd-MM")
log.info (dtt.format( new Date()))
 
 
//*
//TO GET THE DEFAULT PROPERTIES FROM SOAP UI
//*
 
 
 
//TO get the Project Name
def username = testRunner.testCase.testSuite.project.name
log.info (username)
 
//To get the Test Suite Name
def username1 = testRunner.testCase.testSuite.name
log.info (username1)
 
//TO get the Test Case Name
def username2 = testRunner.testCase.name
log.info (username2)
 
//TO get the Test Step Name
def username3 = context.getCurrentStep().getLabel()
log.info (username3)
 
 
 
//*
//To GET AND SET CUSTOM PROPERTIES IN SOAP UI
//*
 
 
 
//TO SET THE CUSTOM TEST CASE PROPERTY
testRunner.testCase.setPropertyValue( "MyProp", 'someValue' )
 
//TO GET THE CUSTOM PROPERTY THAT THE USER HAS CREATED IN TEST CASE
def testCaseProperty = testRunner.testCase.getPropertyValue( "MyProp" )
log.info(testCaseProperty)
 
//TO SET THE CUSTOM TEST SUITE PROPERTY
testRunner.testCase.testSuite.setPropertyValue( "MyProp", 'someValue' )
 
//TO GET THE CUSTOM PROPERTY THAT THE USER HAS CREATED IN TEST SUITE
def testSuiteProperty = testRunner.testCase.testSuite.getPropertyValue( "MyProp" )
log.info(testSuiteProperty)
 
//TO SET THE CUSTOM PROJECT PROPERTY
testRunner.testCase.testSuite.project.setPropertyValue( "MyProp", 'someValue' )
 
//TO GET THE CUSTOM PROPERTY THAT THE USER HAS CREATED IN PROJECT
def projectProperty = testRunner.testCase.testSuite.project.getPropertyValue( "MyProp" )
log.info(projectProperty)
 
//CODE ENDS HERE
Advertisements

SQL Server Schema Compare

Recently when I need a tool to compare the schema between two databases, I came across a interesting tool called SQL ADMIN STUDIO

SQL Admin Studio is a powerful SQL Management Tool (for FREE).
We can browse the database schema, design Tables, Triggers, Views, Stored Procedures, Functions and more.
And it works with Microsoft SQL Server 2000, MSDE, 2005, Express, 2008, 2008R2 2012, SQL Azure, MySQL 5.0 and Microsoft Access.

Some of the Features are,

Export Data
SQL Admin Studio provides functions to simply export your data to CSV File, Excel File, XML File and SQL Script file.
All this is available from the mini-toolbar on the results window. The result form any SQL Query can be exported into these file types in a matter of seconds.

Import Data
SQL Admin Studio can import data across Servers this allows you to make simple backups of remote databases over the internet by simply importing the data.
Importing Microsoft Access Databases into SQL Server or just creating a copy of an existing database.

Compare SQL Database Schema
SQL Admin Studio can compare 2 SQL Server database schemas to locate the differences and can even script the differences
without having to drop all objects and re-create the database from a create script.

Compare SQL Database Data
Simply generate SQL Data Change scripts by comparing the database between databases.
Changes can then be executed directly within a transaction or scripted to be applied manually later.

For more details Visit here – http://www.simego.com/Products/Sql-Admin-Studio

You may need Microsoft Sql Server Native Client to be installed in you machine. For this if you have 64-Bit,
Download and isntall it from
http://download.microsoft.com/download/2/7/c/27c60d49-6dbe-423e-9a9e-1c873f269484/sqlncli_x64.msi
For 32 Bit download and install it from
http://download.microsoft.com/download/2/7/c/27c60d49-6dbe-423e-9a9e-1c873f269484/sqlncli.msi

Compare SQL Database Schema

Open SQL Admin Studio and Connect to the SQL Server.

SchemaComp1

Goto Tools->Compare->Schema

Select Database A and Database B the two databases that you want to compare schema.

I am going to Compare AdventureWorks2005 database with AdventureWorks2008R2 database.
Click on the Compare Button.

You can see the results as below.

SchemaComp2

The table [person].[contact] is missing from the database AdventureWorks2008R2
Click on the Table Link and It will open the Window like below.

SchemaComp3

Data Modeler for SQL Server

“Data Modeler” is a free tool to create Microsoft SQL Server databases.

If you are trying to design a databse correctly and this is one of the good database design GUI.

Some of the popular features of Data Modeler are

Real-time model validation
DDL regeneration
Table data synchronization
Drag ‘n’ drop foreign key creation
Automatic query script creation
Automatic relationship line placement
Object-level DDL previews
Bulk undo/redo
Schema support
Sub-models
Data dictionary
Update/delete foreign key automation
Customizable fonts and colors

For more details, Please refer http://sourceforge.net/projects/sqldatamodeler/

You can download it from here – http://sourceforge.net/projects/sqldatamodeler/files/latest/download