Multi-Shoring

How to Get an HTTP Cookie for Web Service Authorization in SoapUI

Web service may need credentials to allow a client to make a request call to the report server. The authorization method depends on the security settings for your report server. SoapUI is a popular web service testing tool, and testers need to send authentication information in SoapUI to the server before testing target requests.

Authorization Types

SoapUI provides a UI function to get credentials for basic authorization, NTLM authorization, and OAuth 2.0 authorization. Testers just need to select the authorization type and type username, password and domain, then the request can pass the authorized information to server. But some servers need to get the sessionID or cookies to validate instead of username. In this blog post, we will discuss how to get the HTTP cookie as a credential. Read the rest of this post »

Posted in Testing

Exchange Data between TM1 Instances by TM1RunTI

Here is an example to transfer data between TM1 Instances byTM1RunTI configuration file and some tips for trouble shooting.

TM1RunTI is a command line interface tool that can initiate a TM1 TurboIntegrator (TI) process from within any application capable of issuing operating system commands. That means it can be called cross TM1 Instance, especially when you want to exchange data between instances.

Suppose there are two TM1 Instance A and B. Now we want to transfer data from A to B. The TI in instance B will be called by TI in instance A, so the data can be loaded into instance B. Read the rest of this post »

Posted in BI&Database

Integrate Scala to automation test projects

Scala is a JVM-based, statically- checked, multi-paradigm programming language — mixing up object-oriented programing with functional programing, which delivers a concise and elegant code style. Scala codes can be seamlessly compatible with Java projects as the complier of which turns all those .scala files into several .class binary files. And currently IDE plugins for Scala have been mature in some extent to support a smooth coding experience.

I’ve tried to integrate Scala code into an existing selenium-testng frame. It turned out easy to reach: Read the rest of this post »

Posted in Coding, Testing

A Spark Example to MapReduce System Log File

In some aspects, the Spark engine is similar to Hadoop because both of them will do Map & Reduce over multiple nodes. The important concept in Spark is RDD (Resilient Distributed Datasets), by which we could operate over array, dataset and the text files. This example gives you some ideas on how to do map/reduce from a log file stored in HDFS and determine which IP address was repeated most frequently:

Sys Log Format

Here is the log file format that we used to do analysis and count how many Source Addresses occur most. We will filter most of the information and only look at Source Address section. Read the rest of this post »

First bite of Apple’s new UI testing tool

In early June, Apple released a new UI testing tool in WWDC 2015. I’ve tried this interesting tool in some of our internal projects during the past three weeks, and I’ve discovered some pros and cons along the way. I share my experiences below:

What’s my environment:

OS X Yosemite 10.10.3

Xcode 7.0 beta 2 (pre-release version)

Swift 2.0 (pre-release version)

iPhone 6 Simulator iOS 9.0 (pre-release version)

The pros of Apple’s new UI testing tool: Read the rest of this post »

Posted in mobile, Mobile APP, Testing

Heron: Is it Apache Storm 2.0?

In terms of real-time messaging or event analytics on the distributed node, we think of Storm and Kafka, both famous Apache projects. Storm has been used in Twitter’s production for many years, so it proves to be powerful. On June 4, Twitter shared news that the company developed a new system called Heron to handle billions of events each day, which is fully API-compatible with Storm. Here, we preview the new features in Heron and what’s different with Storm: Read the rest of this post »

Introduction to jQuery Ajax

Concept

This blog is intended for novice to understand jQuery Ajax functionality and its integration with servlet by creating a simple project.

 What is JQuery Ajax?

Ajax (Asynchronous Java Script and XML) enables exchanging data between client and server and updating parts of web page without reloading the entire page. jQuery provides easy to use API for Ajax. Data types, text, html, xml, json, jsonp and script are handled.

The following methods are available in jQuery framework to make arbitrary Ajax requests:

          Method                                         Description
 jQuery.ajax() Performs asynchronous HTTP (Ajax) request
 jQuery.ajaxPrefilter() Handles custom Ajax options or modifies existing options before each request is sent and before being processed by $.ajax()
 jQuery.ajaxSetup() Sets default values for Ajax requests. Its use is not recommended
 jQuery.ajaxTransport() Creates an object and handles actual transmission of Ajax data

 

The sample program elucidates how to construct jQuery Ajax request and implement a servlet. In the example, we populate a table dynamically using ajax every time a name is entered in a textbox.

Requisites for Development Environment set up:

  1. JDK 7.0_60
  2. Tomcat v7.0
  3. Eclipse Java EE IDE for Web Developer Luna (4.4.0)
  4. jquery-2.1.1.min.js

Steps to implement:

  1. Create a dynamic web project with project structure as shown below.                                                                                                      1
  1. Create a html page, AjaxJquery.html with textbox, button and table.                                                                                                                            2
  1. Next, create $.ajax() request to send name in asynchronous HTTP GET request to JqueryServlet.

It encompasses following properties:

         Parameter                                              Description
 url  String containing the url to which the request is sent (mandatory)
 method  Specifies the HTTP method to use for the request (‘POST’, ‘GET’, ‘PUT’)
 data  Data to be sent to the server. It can be plain object ({key1: ‘value1′, key2: ‘value2′}),  String (key1=value1&key2=value2) or Array
 done  Method that is called if the request succeeds. It accepts one or more arguments, all of which are functions. Each callback function takes 3 arguments, the data returned from the server, a string describing the status and the jqXHR (jQuery XML Http Request) object. Other callbacks supported include fail and always
 datatype  Can be text, html, xml, json, jsonp and script. Depending on the data type set the response will be preprocessed before being passed to the success handler

 

3

  1. Create HttpServlet class, JqueryServlet.java, overriding doGet() method to receive request and send response to client.                                                                                                                                                                                                                                4

 

  1. Map the servlet in web.xml, here, com.servlet.JqueryServlet is mapped to /JqueryServlet/*.                                                                                           5
  1. Deploy, run the application and observe the output.

Output :

6

References:

http://api.jquery.com/jQuery.ajax/

 

Tags: , ,

Posted in Coding

How to Configure Eclipse for Spark Application in the Cluster

Spark provides several ways for developer and data scientist to load, aggregate and compute data then return the result. Many Java or Scala developers would prefer writing their own application codes (aka Driver program in spark term) instead of inputting command in the built-in spark shell or python interface. We are sharing some steps regarding how to quickly configure your IDE in order to write Spark application code. Read the rest of this post »

How to install Tabular Mode Service in SSAS 2012

Introduction

SSAS 2012 provides three different approaches for creating a business intelligence semantic model: tabular, multidimensional, and PowerPivot.

Tabular solutions use relational modeling constructs such as tables and relationships for modeling data, and the xVelocity in-memory analytics engine for storing and calculating data.

Multidimensional and data mining solutions use OLAP modeling constructs (cubes and dimensions) and MOLAP, ROLAP, or HOLAP storage.

PowerPivot is a self-service BI solution that lets business analysts build an analytical data model inside an Excel workbook using the PowerPivot for Excel add-in.

Tabular and multidimensional solutions are built using SSDT and are intended for corporate BI projects that run on a standalone Analysis Services instance. Yet each solution differs in how they are created, used, and deployed. Read the rest of this post »

Handle Slowly Changing Dimensions with Pentaho Kettle – Part2

We examine SCD Type I and Type II here.

Overview of Kettle transformation

Here is overview of transformation. It will be loaded from excel source file and loaded into database.

01 Read the rest of this post »

Posted in BI&Database