marți, 23 mai 2017

RabbitMQ Server Installation on Windows - Steps

RabbitMQ runs on the Erlang virtual runtime.
Install Eralng (8.3)
  • Check for environment variable (ERLANG_HOME)
  • Cmd to C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.9\sbin
    • Run rabbitmq-plugins.bat enable rabbitmq_management
    • Restart rabbitmq service
rabbitmq-service.bat stop 
rabbitmq-service.bat install 
rabbitmq-service.bat start

  • Username: guest
  • Password: guest

vineri, 19 mai 2017

PowerMockito: Verify if a static method is called

import static org.junit.Assert.assertEquals; 

import org.junit.Test; 
import org.junit.runner.RunWith; 
import org.mockito.Mockito; 
import org.mockito.invocation.InvocationOnMock; 
import org.mockito.stubbing.Answer; 
import org.powermock.api.mockito.PowerMockito; 
import org.powermock.core.classloader.annotations.PrepareForTest; 
import org.powermock.modules.junit4.PowerMockRunner; 

public class Test_StaticMethodCall { 
    public static boolean called = false
    public void test_check_static_error_method_is_called() throws Exception { 
        called = false
        // mock static GlobalUtil 
        //set called on true if error method is called 
        PowerMockito.doAnswer(new Answer<Void>() { 

            public Void answer(InvocationOnMock invocation) throws Throwable { 
                Test_StaticMethodCall.called = true
                return null
        }).when(GlobalUtil.class"error", Mockito.anyObject(), Mockito.any(Throwable.class));
        new ClassToBeTested().testMethod(); 
        assertEquals(true, called); 

class GlobalUtil { 
    public static void error(Object msg, Throwable t) { 
        //do something 

class ClassToBeTested { 
    public void testMethod() { 
        Boolean nullBollean = null
        try { 
            if (nullBollean) { 
                //do something 
        } catch (Exception ex) { 
            GlobalUtil.error("Somthing is wrong", ex); 

luni, 13 martie 2017

Scum - Agile: Definition of Ready (DoR)

Who’s responsible for USs to be in ready state: TEAM

"The Product Owner is responsible for putting the features and stories in the backlog. However, the Team must work with the Product Owner during Backlog Grooming to help them get the stories into actionable shape."


Title: Story must be written as a user story (i.e. “As a <kind of user> I want <feature> so that <benefit>”)

Documented (where appropriate)
Title may be sufficient almost of the time
At least a Description should be added in Rally
Or a reference to a FEA/ENH/BUG in IxTracker
Or email discussion (attached to Rally)
Note: Use cases/ test plan can be another way to document the user story
Acceptance criteria defined

Dependencies identified

Size estimated by delivery team

Use cases: User experience included (where appropriate)
MUST / where appropriate

Performance criteria identified (where appropriate)
MUST / where appropriate
Note: Need automation to execute Performance Tests (currently, the automation is executed manually).
Person who will accept the user story is identified

Team has a good idea about how to demo the user story

Task breakdown
Note: There is no agreement if task breakdown should be part of the definition of ready.
PRO: may help with estimation
AGAINST: Breaking a US in task is part of Planning


Having the definition of done may be the first step to Waterfall
If these rules include saying that something must be 100 percent finished before a story can be brought into an iteration, the Definition of Ready becomes a huge step towards a sequential, stage-gate approach.
A Definition of Ready Can Lead to Stages and Gates (Waterfall)