Multi-Shoring

Categories

A Simple Illustration Using AngularJS

This blog post explains how to create a Simple Shopping Cart using AngularJS.

What is AngularJS?

AngularJS is an open-source MVC JavaScript (programming language) framework, which simplifies web development by offering automatic view/model synchronization.

In this example, we will create a simple application to add the item, remove the item, increment and decrement the quantity of items by implementing AngularJS and items are stored in the browser’s local storage.

The following are required for Development Environment set up:

  1. Tomcat v7.0
  2. Eclipse Java EE IDE
  3. angular.js (core JavaScript file form Google )
  4. ngstr.js (angular.js module used for performing CRUD operations in local storage )
  5. bootstrap.css (used for styling purpose)
  6. app.js (used for performing some set of operations like add, remove and update the items)
  7. mobile_list.txt (sample JSON values which is used for displaying items)
  8. index.html(for displaying the items)

Read the rest of this post »

Posted in News

Tips and Tricks in Notepad++

This blog post is intended for users who need to get rid of the repetitive tasks in Notepad++ and thereby reduce the time for data formatting and improving the efficiency.

Background – Notepad++ is a powerful open source text editor for use with Windows. In this post, the Macro and the Column mode editing features of Notepad++ are illustrated.

What is a Macro?                                                                                                                                

Macro is used to make a sequence of computing instructions available to the programmer as a single program statement, making the programming task less tedious and less error-prone.

Making use of Notepad++ Macro

Macro is one of the powerful features in Notepad ++ as it allows to automate some of the repetitive tasks.

Notepad++ allows users to record the actions that need to be automated by the macro, save it for further use and play back.

By default, notepad++ offers a macro “Trim Trailing spaces and save”, which could be used in SQL operations to remove the unwanted trailing spaces in the data. Trim is one of the most frequently used operations for String type data.

Example 1:- Illustration for using macro “Trim Trailing spaces and save” to trim the extra space.

  • Consider the below example where we have spaces at the end.

          Pic 1 - Example with Spaces Read the rest of this post »

Posted in News

Websphere Message Broker ODBC – Code Page

Websphere message broker makes a connection to Database using both ODBC and JDBC connections. ODBC driver is using 1208(UTF-8) code page  while interacting with Database.
There is a scenario that a message flow uses ODBC DSN to connect to Oracle Database and invokes a stored procedure to retrieve information. One of the fields (description) returned by stored procedure is of Char datatype. The value returned in this field needs to display Trade mark symbol. For example ™. But when the value returned by stored procedure referred the value is changed to ¿.
This is because the ODBC driver which invokes the stored procedure uses a Unicode(UTF-8) encoding and ™ is not present in UTF-8 character set Hence it is returned as a garbage value since the character is unidentified in the UTF-8 character set.
In the table, it is stored properly.

Blog1

The reason being database is using a different character set 1252 as shown below and 1252 code page supports ™.

Blog2

Solution Proposed:
The solution proposed is create a new stored procedure by updating the current stored procedure to return a RAW value of the text and after the response is received we would want to convert it to the required code page which would be 1252 in this case. This requires changes to stored procedure and esql.
Changes:
• New procedure to be created by updating existing procedure as below:

CREATE OR REPLACE PROCEDURE TEST
(PROD_ID IN NUMBER,
PROD_COLOR IN VARCHAR2,
— DESC OUT VARCHAR2, (commented the existing)
V_PROD_TXT OUT LONG RAW, (updated field to return as BLOB)

SELECT PROD_ID,
PROD_COLOR,
PROD_TXT, (commented the existing)
SYS.UTL_RAW.CAST_TO_RAW(PROD_TXT), (updated field to return as BLOB)

• Esql mapping to CAST it as character with 1252 code page.
SET OutputRoot.XMLNSC.Prod.ProductDesc =CAST (productDesc AS CHARARCTER CCSID 1252);

Posted in SOA

Configure Selenium Tests in Multiple Browsers

shutterstock_106257662_smallThis post will cover how to configure tests to run in multiple browsers using JUnit. Consider any testing framework: it should have a Driver script and a Driving script. The Driver script is the starting point of a test. The flow of a test execution usually begins from the Driver script. We can configure the Driver script in such a way to handle multiple browsers all by itself using the power of annotations and leaving the business logic alone to the user for implementing. In order to achieve that, we need a basic understanding of the JUnit annotations.

@BeforeClass: Any function inside this annotation is the first to run before any of classes/methods start executing. All the initial configuration must be done here.

@AfterClass: This is usually the last method to run after all other methods/tests have completed executing, functions inside this annotation execute to complete the test.

@Before: Methods inside this annotation would execute every time before a method in @Test runs.

@After: Methods inside this annotation would execute every time after a method in @Test runs. Read the rest of this post »

Posted in News

Hard and Soft Assertions in Selenium

shutterstock_172392188_350This post covers how to handle Assertion Failure in Selenium. Test scripts can be very robust and large. Assertions are the best method to perform any kind of validations in the tests. When an assertion fails the test script stops execution unless handled in some form. There are two types of assertions:

  1. Hard Assertions
  2. Soft Assertions.

Hard Assertions

A Hard Assertion is type of assertion that throws an exception immediately when an assert statement fails and continues with the next test in the test suite. In order to achieve this, we need to handle the Assertion Error that is thrown with a catch block like a Java exception. After the suite completes execution, the particular test is marked as passed instead of a FAIL.

Let’s assume that there are two tests in a suite, and the first test in the suite has an assertion that fails. In order to continue with the second test in the suit, we will have to handle the assertion failure in the first test.

Here is the code to handle an assertion: Read the rest of this post »

Posted in News

MQ Integration in IID – WebSphere Process Server v8.5

This blog elucidates the steps to integrate a Message Queue with Business Process Management – Advanced V8.5.

1) Create a connection Factory with a WebSphere MQ Provider as shown below:

1

2) Select the scope of the configuration and click New. Read the rest of this post »

Tags: , , , ,

Posted in News

Parallel execution of tests using Selenium-Grid and TestNG

Selenium-Grid allows you to run your tests on different machines against different browsers in parallel. That is, running multiple tests at the same time against different machines running different browsers and operating systems. Essentially, Selenium-Grid support distributed test execution. It allows for running your tests in a distributed test execution environment.

When to use

  1. To reduce the time it takes for the test suite to complete a test pass.
  2. To run your tests against multiple browsers, multiple versions of browser, and browsers running on different operating systems.

Read the rest of this post »

Posted in Testing

Handling Authentication Pop-Up While Running Automation Script

When running an Automation Script in the client VDIs, the most commonly faced issue is the display of an Authentication Dialog pop-up. If the user fails to enter the Authentication data’s in the pop-up displayed, the requisite Script halts its execution. The display of this proxy message cannot be controlled via Automation tools as it cannot handle the popups emerging from the site other than the Application under Test (AUT).

It also emerges out to be a tedious task for the user to enter the credentials every time the script runs.

Blog1

The most feasible solution for fixing this problem is by inculcating any one of the following methods in order to bypass the occurrence of the Authentication dialog box.

  1. Appending the username & password in the Website that is under test would help overcome the Authentication pop-up.

https://username:password@www.test.com

  1. The other method is by entering the user credentials at the end of the website followed by a question mark.

https://@www.test.com?QueryStringforUsername=username&QueryStringforPassword=password

The above mentioned methods can be entered in the Script while passing the Website’s URL or also can be fed in as an excel parameter in case the Project follows a Data Driven-Framework/ Hybrid Framework. Read the rest of this post »

Posted in News

How to add JAX-WS Proxy of Fusion Services

In the previous post, we discussed about configuring certificates and keystore for Oracle Sales Cloud Fusion Services, in this article, we will discuss about generating JAX-WS proxy of Fusion services in a Java application using JDeveloper.

  • Create Java Application
  • In JDeveloper Studio, create new application and select Custom Application

Create Application in JDeveloper

  • Enter Application name and click Next

Read the rest of this post »

Posted in News

Creating keystore and configuring JDeveloper for Fusion Services

Create keystore using Oracle fusion public certificate

In order for the client to authenticate to Fusion services, the server-side certificate needs to be obtained and added as a trusted certificate entry to a keystore used by the client. Public certificate for Fusion can be obtained by navigating the Fusion services WSDL in the browser.

View Certificates using IE

Certificates can be viewed using the View Certificates link shown in the above image. Read the rest of this post »

Posted in News