Automation TestingManual TestingProduct Engineering

Ensuring Code Quality and Performance in Offshore Projects

Technology landscape is constantly evolving. Companies that are able to embrace advances in data, machine learning, analytics, cloud, mobility, IoT and other digital technologies are able to successfully go to market faster and outperform competitors.  While some companies are able to hire experts in-house to build disruptive products, some others have to rely on an […]

Node.jsTechnologyTesting

Custom matcher for testing with Jasmine

Jasmine is a behavior-driven development framework for testing JavaScript code. Many Jasmine users only use the default set of matchers which are extremely powerful, yet are unable to meet our requirements when dealing with complicated or custom code. Jasmine provides a wide list of built-in matchers: Arrays: [javascript] expect(array).toBeArray(); expect(array).toBeArrayOfNumbers(); expect(array).toBeEmptyArray();[/javascript] Booleans: [javascript] expect(boolean).toBeBoolean(); expect(boolean).toBeFalse(); […]

Technology

Unit test a method returning an object of protected class

Following is an example of testing a method which returns an object of protect class: In the previous blog we talked about fetching the list of message codes from message.properties file. While writing the test case for CustomisedPluginAwareResourceBundleMessageSource, I was not able to test the message properties that are available when your application is actually […]

Neha Gupta
Neha Gupta
Read

Grails

Unit testing parameters in forward method

I always wanted to test the parameters being passed in the forward method in a controller in my unit tests. Suppose we have any controller like: [java] class DemoController { def anyAction() { forward(controller: “demo”, action: “test”, params: [param1: “1”]) } } [/java] to test this forward action, we first need to mock the forward […]

Neha Gupta
Neha Gupta
Read

Technology

Node.js: Unit Testing with Jasmine framework

Jasmine is a framework which is used for testing node.js code or javascript code. Installation To install the latest official version, use NPM: [js]npm install jasmine-node -g[/js] Write the specifications for your code in *.js and *.coffee files in the spec/ directory Execution After installing the npm package, you can run it with: [js]jasmine-node spec/filename.js […]

Services