Friday, April 17, 2009

Using Selenium

Recently i have worked on two open source testing tools , and i found selenium as one of the best open source web testing tool available .. here below i m listing down how we can use selenium IDE..

How to create a test plan in Selenium IDECreating a test plan in Selenium IDE is very easy, so we will use it to create few simple tests to begin with.
1. Install Selenium IDE 0.8.7, a Firefox plugin.
2. After installing Selenium please restart your Firefox browser for the plugin to be activated.
3. Now you should see a new added menu item named Selenium IDE under your Firefox Tools menu.
4. Open / browse the site for which you want to prepare a test case.
5. Start Selenium IDE from Firefox Tools->Selenium IDE.
6. Browse some pages.
7. Now click red button to stop recording.

At this point you will see Selenium automatically recording your actions. Carefully note the commands, target and value. You can create and insert your own commands/ modify or even delete them. We will show some examples below. In the next section we will see how we can modify the generated tests to suit our needs.

How to create / modify / delete Selenium commands

The default commands generated by Selenium when you are browsing the page as a normal user should be modified to make the test more robust and to add test cases to it.

1. Let's replace all click commands by clickAndWait. click simply clicks the specified link and goes on to execute the next command without waiting. On the other hand clickAndWait waits for the new page to loaded before executing the next command. clickAndWait should be used to make more robust test cases.

2. Insert assertTextNotPresent command after each clickAndWait command to confirm a text must not be present in the browsed page.

3. Use assertTextPresent command to confirm a text must be present in the browsed page.

4. Finally to test your test plan please click green arrow button to play from the begining or to play from start point.

5. Export the test plan as java file by Selenium IDE File->Export Test As->Java - Selenium RC (for example the file name is SeleniumSTSanityTest.java)

6. Then close your Firefox Selenium ID.

How to run above test plan (automatically generated java file from Selenium IDE) in command line?

1. Download Selenium RC.

2. Unzip it under the same directory where SeleniumSTSanityTest.java (exported test plan as java file from Selenium ID) was saved.

3. Install junit.

4. Go to directory where you unzip selenium-remote-control-1.0-beta-1-dist.zip file.

5. Open a terminal and do the steps below-
a. cd selenium-remote-control-1.0-beta-1/selenium-server-1.0-beta-1
b. java -jar selenium-server.jar (to run the server in interactive mode execute java -jar selenium-server.jar -interactive)
c. If you get an error like Error: com.thoughtworks.selenium.SeleniumException: ERROR Server Exception: sessionId should not be null; has this session been started yet? then ensure that the browser is in the PATH before running the server. For example, you want to run the test in Firefox. Then you should do next two steps.

d. locate firefox-bin (for example it returns /usr/lib/firefox-1.5.0.12/firefox-bin)

e. export PATH=$PATH:/usr/lib/firefox-1.5.0.12/firefox-bin;
Note: There is an alternative way to fix above error (browser is not in path). Simply replace chrome with browser PATH in SeleniumSTSanityTest.java file. For example:
line
setUp("http://floratec.blogspot.com", "*chrome");
becomes
setUp("http://floratec.blogspot.com", "*firefox /usr/lib/firefox-1.5.0.12/firefox-bin");
in SeleniumSTSanityTest.java.
To run the test in opera browser replace chrome with opera.

6. Now the selenium server is running and you have to run the Java client located in selenium-remote-control-1.0-beta-1/selenium-java-client-driver-1.0-beta-1.

7. Open another terminal.

a. export CLASSPATH=.:selenium-remote-control-1.0-beta-1/selenium-java-client-driver-1.0-beta-1/selenium-java-client-driver.jar:/usr/share/java/junit.jar
b. javac SeleniumSTSanityTest.java
c. java SeleniumSTSanityTest

8.The automatically generated java file SeleniumSTSanityTest.java is likely to have some defects. Fix it by comparing with the example below

:import com.thoughtworks.selenium.
*;import junit.framework.
*;import java.util.regex.Pattern;
public class SeleniumSTSanityTest extends SeleneseTestCase { public void
setUp()
throws Exception { setUp(http://floratec.blogspot.com, "*chrome"); // to run the test in opera replace chrome with opera }
public void testSimpleThoughts() throws Exception { selenium.open(""); assertFalse(selenium.isTextPresent("WordPress database error: [")); assertTrue(selenium.isTextPresent("2003-2008"));
selenium.open("/index.php/category/programming/java");
selenium.waitForPageToLoad("30000");
assertFalse(selenium.isTextPresent("WordPress database error: ["));
assertTrue(selenium.isTextPresent("2003-2008"));
selenium.click("//img[@alt='Übersetzen Sie zum Deutsch/German']"); selenium.waitForPageToLoad("30000"); assertFalse(selenium.isTextPresent("WordPress database error: [")); assertTrue(selenium.isTextPresent("2003-")); selenium.click("//img[@alt='Přeložit do Čech/Czech']"); selenium.waitForPageToLoad("60000"); assertFalse(selenium.isTextPresent("WordPress database error: [")); assertTrue(selenium.isTextPresent("2003")); } public static Test suite() { return new TestSuite(SeleniumSTSanityTest.class); } public static void main(String args[]) { junit.textui.TestRunner.run(suite()); }}

Wednesday, April 8, 2009

Software as a Service

Software as a Service
DefinitionSoftware as a Service (SaaS) is a model of software delivery where a company adopts specific activities that provide customers access to software, alleviating that customer from the maintenance and daily technical operation and support of business and/or consumer software. SaaS is a model of software delivery rather than a market segment; software can be delivered using this method to any market segment including home consumers, small business, medium and large business.

Objective
SaaS is built on the legacy of the ASP model, but modernized and enhanced by today’s robust web services integration capabilities, increased bandwidth and bandwidth availability, and more mature infrastructure.

Why SaaS
Software as Services provides clients access to business functionality remotely as a service. As organizations seek new and less costly methods to acquire and pay for business applications, business partners are increasingly being asked to deliver their software on demand with usage-based pricing. Software as Services offers customers lower costs that are aligned with usage, minimal up front expense, rapid implementation, and time to value, plus reduced risk. The SaaS market forecast is to reach US$10.7B by 2009. Software-as-services is on the cusp of going mainstream — both as an application delivery/pricing model and as an architectural model.

SaaS model
Software as a Service (SaaS), also known as software on demand, is a new model that is causing a profound shift in the way that applications are delivered and consumed. SaaS refers to software that is accessed via a web browser, typically on a subscription basis. Fundamentally different from the traditional model of application delivery, in which the customer acquires a perpetual license and assumes responsibility for the software's implementation and ongoing management, SaaS presents significant advantages to both customers and vendors

SaaS Strategic Offering
· Open new markets, revenue streams, and distribution channels
· Provide a stable, recurring revenue model
· Afford consolidation of development and support efforts around single versions of code

Key characteristics of software delivered by SaaS
The key characteristics of SaaS software include:
Network-based access to commercially available (e.g., not custom) software
Network-based management of commercially available software
Activities that are managed from central locations rather than at each customer's site, enabling customers to access applications remotely via the Web
Application delivery that typically is closer to a one-to-many model (single instance, multi-tenant architecture) than to a one-to-one model. This includes architecture, pricing, partnering, and management characteristics

Types of SaaS Providers
There are primarily two types of SaaS providers.
1. Application service provider (ASP) where a customer purchases and brings a copy of software to a hosting company, or the hosting company offers widely available software for use by customers (e.g. hosting Microsoft Office) and making that available across the web to customers who pay a fee per month for access to the software. There is a separation between a licensing fee and a monthly fee that is paid to the maker of the software and the “hoster” of the software as appropriate.
2. Software on-demand where a company offers software to customers specifically built for one-to-many hosting. This means that one copy of the software is installed for use by many companies who access the software across the web. There is no division between licensing and hosting fees, and where there is little to no customization of software for each customer.

ASP versus SaaS
Plenty of ASPs bloomed and wilted with the dot-com boom and bust, but what those vendors did provide applications on demand - is alive and well and poised for a rebound. Failure of ASPs was attributed to customers demanding extensive customization on the part of the service providers. That blew apart the ASPs business model, resulting in the subsequent marketplace carnage. The reason for moving away from the term ASP is that the ASP generation was merely traditional client-server applications with HTML front ends added as an afterthought. These applications were hosted by third-parties who ordinarily did not have application expertise, but were managed servers. Because the applications were not written as net-native applications, performance was poor and application updates were no better than self managed applications. In comparison, SaaS is more like business process outsourcing, and its vendors might be called business service providers. The current net-native SaaS applications or independent portions are updated regularly, many daily.


SaaS – Model Diagram
The above model diagram depicts how SaaS functions

How can SaaS model be achieved
Companies need to find the applications they use that are not core to their business and that can be utilized as a commodity service. Companies don't need to overspend on utility-type services. Vendors are creating utility offerings so that business services can be bought and have software as a service. They're creating capabilities and expecting that those can be bought in new ways. It can be achieved via 2 ways
1. Host: To become a host to all the software vendors by partnering with then and then provide quality services to the customer world
2. Vendor. To come up with commercially available software and then tie up with hosters so as to find a platform to have the software available as services.
The leader would be one who has expertise and infrastructure to host such a platform and even has capabilities to come up with commercial software.

Potential Advantages - SaaS
Ø Software as a Service (SaaS) delivery model presents significant new sales opportunities. The more established vendors can move downstream and capture revenue from the companies that could not afford the licensing and maintenance costs of software under the old perpetual license model, while smaller and emerging software vendors can now successfully compete with the larger players.
Ø The SaaS model lends itself to a variety of marketing techniques, many of which are extremely well suited to the small-to-midsize or emerging software company with limited marketing resources. In fact, one of the key advantages of the SaaS model from a vendor perspective is the ability to utilize effective low-cost marketing techniques to tell their story and convince potential buyers of the value of their solution.
Ø The techniques are typically easy to implement and are highly effective at producing, capturing, and capitalizing on inbound traffic in a very cost-effective manner
Ø SaaS model is inherently flexible. As technology is constantly evolving, many companies have found themselves burdened with expensive software solutions that no longer meet requirements. Over time, this accumulation of "shelf-ware" has heightened resistance toward new investments in enterprise applications. SaaS makes it easy for customers to select the applications that they need, and eliminate the ones that they don't.
Ø SaaS eliminates end-of-quarter discounting pressures and enables software companies to enjoy predictable streams of recurring revenue.
Ø the rapid evolution of the SaaS development cycle lends itself to improved vendor-customer relationships, as it pushes the software company to release fixes and enhancements much more quickly that in the perpetual license model.

Challenges - SaaS
Ø Complex issues involved with building the service delivery capabilities necessary to support SaaS offerings.
Ø To live up to the end users demand of 100% uptime, appropriate Service Level Agreements, and 24*7 call center support
Ø Meeting the above demand requires 24x7 application and systems management, hosting, networking and security infrastructures, disaster recovery capabilities, change management policies and procedures.
Ø Form and retain a team of experts in operations and engineering who have previously designed, built, and managed complex infrastructures.
Ø Because the application is essentially delivered as a service, the software company must be entirely focused on the customer experience, or risk losing business. In the pay-as-you-go model, vendors are being judged on a month-to-month basis, and there is added pressure to produce rapid improvements to the application.

Remarks & Conclusion
The numerous advantages of SaaS over the perpetual license-based model of software delivery have created a significant opportunity for software vendors. The time is right for business processes on demand and more than 50% of software business is envisaged to be relying on SaaS model in the next 5 years. It is therefore highly recommended to explore more in this field and to use this model as an additional mode of revenue generation given the wide expertise the organization has in software arena.

Tuesday, February 10, 2009

Information Architecture Principles

1. Purpose
The Purpose of this document is to define Information Architecture Principles ( which are subset of IT principles ) for System Planning and Implementations of any Organization.

1.1. Scope

The Scope of this document is limited to definition of Architecture Principles for Information Domain.

1.2. Definitions, Acronyms and Abbreviations

TOGAF - The Open Group Architecture Framework
COBIT – Control Objectives for Information and related Technology
SOX – Sarbanes–Oxley Act
BASEL II - Basel II is the second of the Basel Accords, which are recommendations on banking laws and regulations issued by the Basel Committee on Banking Supervision.



1.1. Overview

Principles are general rules and guidelines, intended to be enduring and seldom amended, the inform and support the way in which an organization sets about fulfilling its mission. Architecture principles define the underlying general rules and guidelines for use and deployment of all IT resources and assets across the enterprise.

1. Information Principles
For all enterprise business Information, regardless of where it is physically stored or how many different places it is stored in, the enterprise must be able to assemble whatever subsets of that information are required to answer any business question. The principles, conformance to which maximize the value of that Information, are as follows:

1.1. Information Principle – Central Information Management

Name: Central Information Management

Statement: All management information and business intelligence will be sourced from a single consolidated source of information

Rationale:
A central source of information management will provide the Org with a wide
Range of reporting and analysis with being constraint by the organization functional structuring.
Users will become used to a single interface to management information allowing managers to become familiar with the infrastructure and extracting maximum benefit from all information available in the organization. The central source of information will help Organizations to handle with banking compliance like SOX and other regulatory requirements. The central information will eliminate contradicting information sources and ensure accurate reporting of current affairs and identification of issues and opportunities. Increase the flexibility and manageability of providing information rapidly and effectively to support business decisions.
 Use best of breed analytic functionality to support management decision making
. Increased security in managing access to The enterprise's management information

Implications:
v Information must be sourced to the central information infrastructure from all the various operational applications as close to real time as possible
.
v No additional analytical modules are required for transactional applications. 

v The interface to management information and training should be rolled out to all decision makers to effectively access information.

Compliance Requirements: Sox 404 /409 Business Intelligence.

1.2. Information Principle – Minimize Redundancy

Name: Minimize Information Redundancy

Statement: Redundant data must be limited to maximum extent Possible.

Rationale:
Data duplication and data movement must be well managed and only undertaken when necessary . Every time data is moved and duplicated, there is a need for reconciliation. This leads to expensive and time consuming work and reduces confidence in the data quality and consistency of reporting information.

Implications: 

v Data Duplication should be checked before start of new project
v Data Duplication should be only allowed when necessary.

Compliance Requirements: Sox 302/906 Duplicates. BASEL II – Taxonomies.


1.3. Information Principle – Data Quality Measurement.

Name: Data Quality Measurement

Statement: Data quality will be measured both in quantitative and qualitative terms eg. Audit procedures and Data quality questionnaires in the Organization.

Rationale:
v Improved data quality
.
v Accurate usage of data with quality measures.
v Improved management information
.
v Increased operational efficiency

Implication:
v Bi-annually measure data through with a data quality survey.
v Audit data ownership procedures annually
.
v Build in data quality measures into applications
.
v Connect data quality results with performance incentives

Compliance Requirements: Sox 302/906 Reconcilement , Completeness , B2 tracking , accuracy BASEL II – Taxonomies.


1.4. Information Principal – Formalized Data Movement/Enrichment.

Name: Formalized Data Movement /Enrichment.

Statement: All Data Transfer or movement / enrichment activities are managed and Approved by the appointed data strategist and exchange of information muse be subjected to standardization methodology for information exchange/enrichment.

Rationale :

v Control cost associated with data exchange and enrichment.
v Protect operational data.
v Improve data quality and value.
v Data sharing to allow for better detection of fraud.

Implication:

v Data Stewards must have authority and means to manage the data for which they are accountable.
v Development of a formal policy and methodology for data exchange and enrichment
.
v Data strategist must be responsible for approving data exchange/enrichment efforts and minimize cost.
v Identification and management of organizations that can enrich and/or validate the enterprise data.

Compliance Requirements: Sox 404 – Data Stewardship and security. BASEL II – Data Stewardship.


1.5. Information Principal – Data Naming Standards.

Name: Data Naming Standards.

Statement: Data Names and columns (fields) content must be standardized through a central reference repository and must be accessible to the business .

Rationale:
v Consistency of information across all business processes.
v Usability of information increases across he organization.


Implication:
v Alignment of all applications to support the standardized naming standards
v The Enterprise must establish the initial common vocabulary for business .The Definitions will be used uniformly throughout the enterprise.

Compliance Requirements: Sox 302/906 Understanding and measure of data. 404 Specs & Standards, data elements, 409 – Data relevance. BASEL II – Data Structures.

1.6. Information Principal – Information Requirement with data model

Name: Align information requirements with data model.

Statement: All information requirement must be aligned with the corporate data model before requesting changes to the information architecture.

Rationale :
v Integrity of transactional data model stays in tact.
v Prevent duplication of information.

Implication :

v The Corporate data model must be maintained to be up to date all times.
v In any application development life cycle it is a condition to align the application with the corporate data model

Compliance Requirements: Sox 404 – Process Improvement.


1.7. Information Principal – Information Security

Name: Information Security
Statement: Information should be protected from unauthorized use ad disclosure .

Rationale:
v Open sharing of information and release of information via relevant legislation must be balanced against the need to restrict the availability of the classified, Proprietary and sensitive information.




Implication
:

v Aggregation of data , both classified and not , will create a large target requiring review and de-classification procedures to maintain appropriate control .
v The Current Practice of having separate systems to contain different classifications needs to be rethought.
v In Order to adequately provide access to open information while maintain secure information, security needs must be identified ad developed at the data level , not the application level.

Compliance Requirements: Sox 404 Security requirements

1.8. Information Principal – Information Governance

Name: Information Governance.
Statement: All the information elements must be subjected to information architecture governance.

Rationale:
v Sustain data quality

v Improve operational efficiency.

Implication
:

v Design the business process application of the data element
v Assign Applications sourcing the information
v Align with corporate data model, rules, validations, naming standard

v Define data management policies e.g. security, back-up, archiving/retrieval

v Assign data ownership

Compliance Requirements: Sox 404 – Rules, KPIs. BASEL II – Corporate Governance, Data Governance .

1.9. Information Principal – Data Privacy and legality

Name: Data Privacy and Legality

Statement: Information Privacy must be respected and legal requirements must be compiled with, in any event of information exchange or commerce.

Rationale:

v Maintain good relationships with customers and clients.
v Avoid Legal costs due to mismanagement of information resulting in lawsuits.


Implication

v The enterprise must be up to date with laws relating to information
.
v Communicating The enterprise's data policy to customer and clients.
v Legal department needs to be up to date with laws governing information usage, commerce and distribution


1.10. Information Principle – Intermittent

Name: Intermittent

Statement: Information must be structured for global deployment in various cultures and support multi-currency, multi-language and multi platforms.

Rationale:
v It will provide Flexibility to enter or handle global market conditions.
v Consistency of being able to deploy a proven business model and then adapt to local conditions.

Implications: 

Application should be much more flexible to accommodate differences defined by different countries, the current application should be evaluated in terms of internationalization requirements.

Tuesday, December 9, 2008

Data Modeling Approach for DWH and Data Marts



What is Data Modelng ?

We most of tech people know what is data modeling .but when u have to define it "Data modeling is the process of creating and extending data models which are visual representations of data and its organization " The ERD Diagram (Entity Relationship Diagram) is the most popular type of data model. Data models exist at multiple levels including


1. The Conceptual Data Model (Subject Area Model) describes data from a high level. It defines the problem rather than the solution from the business point of view. It includes entities and their relationships. Typically the conceptual data model is developed first.


2 The Logical Data Model (Business Area Model) describes a logical solution to a data project. It provides more details than the conceptual data model and is nearly ready for the creation of a database. These details include attributes, the individual pieces of information that will be included. Typically the logical data model is developed second.


3. The Physical Data Model describes the implementation of data in a physical database. It is the blueprint for the database. Typically the physical data model is developed third.




Characteristic of DWH Data Model-

1. datawarehouse data model should be Enterprise focus i.e means that the data contained in it does not have a bias toward one part of the enterprise over another.

2.it is assumed that the data within data warehouse does not violate any business rules established by the enterprise.

3. The data warehouse must be loaded with new data as quickly and efficiently as possible. The bulk of the work to get data into a data warehouse must occur in the ETL process, leaving minimal time to load the data.

4. The data warehouse must be set up from the beginning to support multiple BI technologies

5. The data warehouse must gracefully accommodate change in its data and data structures.




Data Model Objects --

Subject : - A subject area is the subset of the enterprise’s data and consists of related entities and relationships. Customers, Sales, and Products are examples of subject areas.

Entity : - An entity is generally defined as a person, place, thing, concept, or event in which the enterprise has both the interest and the capability to capture and store information.

Element or Attribute: - An element or attribute is the lowest level of information relating to any entity.

Relationships: - A relationship documents the business rule associating two entities together


Data Modeling Approach--

There are four approaches with generic data models as shown below in the diagram.






Activities to Make A DWH Physical Data Model


1.Prepare Subject Area Model.

2.Identify the Subject Area involved (Entities).
3.Identify the entities of interest.
4.Determine the relationships between pairs of entities.
5.Add all Important attributes.
6.Confirm the model’s structure.
7.Confirm the model’s content.
8.Prepare Business Data Model.
9.Define List of Reports currently used.
10.Analyze the Reports Input Data.
11.Analyze Users Requirements.
12.Analyze source Data Used.
13.Review and Finalize.
14.Create Gap Analysis Document and its solution.
15.Determine data elements.
16.Add Time components.
17.Add Derived data.
18.Adjust granularity details.
19.Finalized the Summery Data.
20.Improve data delivery.
21.Segregate Balance data.
22.Define missing Data.
23.Baseline Data Model ER Model.



DHW Data Model Guidelines --

1. Normalization
Use 3NF for DWH Data Model to contain all Atomic Data , Use IDEF1X data modeling Standards.
2. Understand the Business Model
Understand Specific requirement for Company.
3. Model the Calendar
Analyze Business Calendars.
Define Date Keys and Date time and further normalize and demoralize the calendar.
4. Model the Hierarchies
Define Hierarchy Depth , Percentage and Texture.
Check for Customer , Product , Balanced and Ragged Hierarchies.
5. Model the Business Transactions
Understand business use of the data warehouse
Check average lines per transactions
Check Business Rule Concerning Changes
Check for Snapshot Interfaces - Complete or Current
Check for Delta Interfaces - Columnar , Row
Check for Loading Process.
6. Follow Naming Standards
7. Stamp all rows with create date , Update Date and Source


Data Mart Data Model Guidelines --



















The Physical data model will be developed as per guidelines of this sample given below.
The Details for data model development guidelines are given bel
1.Use Dimensional Modeling Standards
a)Schema Design with star and snow flaking model
b)Use surrogate primary keys for dimensions
2.Fully Develop a Data Subject Area
a)Use DWH Data for Facts etc
b)Use the Dimension Data for Dimensions, i.e. Product, Model, etc.
c)Don’t keep unused application attributes
3.Follow Naming Standards – Table Names, Attribute Names
4.Stamp all rows with Create Date, Update Date, Source
5.Use Surrogate Keys for all Dimension Tables and Keys for all Fact Tables
6.Source Application Surrogate Keys will be kept in the tables but demoted to non-key status
7.Prefer using Normalized Dimension Tables (where Dimension data changes less frequently)
8.Snow Flaking is the preferred approach for dimension tables. Some Dimension tables can be de normalized if frequency of dimension attribute changes is high.


Data Mart Data Model Activities:-






Step 1: Understand source database
Step 2: Identify tables referenced by data sourcing
Step 3: Remove irrelevant attributes
Step 4: Create First Cut Model
Step 5: Identify Facts and Dimensions
Step 6: Integrate Model with common Dimensions
Step 7: Create Second Cut Model
Step 8: Add derived data
Step 9: Create Final Model