Unit Test Global Components using ATG Control Center or AdminUI

How fast and easy  to do unit testing for a Global Component ?

Lets assume i have not coded my JSP Pages,
but for unit testing  i want to  invoke one of the handleMethod(String x,String y)inside my component which is of a Global scope.

The easiest way is to write another test method inside the same
component, and from there invoke the handleMethod.Make sure
you pass the necessary parameters if any required for the original method from your test method.

Like something below:

public void testHandleMethod()
{      String tmp1 = "test";
       String tmp2 = "Method";
       handleMethod(String tmp1,String tmp2)
}

Now in your ACC or Component Browser this method will be visible,
so that you can invoke the testHandleMethod() directly from there.

Note : Your test method must be public
       Your test method must not contain any parameters.

Now invoke the debugger and record the unit test results !!!
Also verify how can we write a unit test case with ATG Dust
ATG DUST Unit test

Comments

Popular posts from this blog

BCC site status inaccessible Agent Production in error state

Weblogic Issues during EAR Deployment Exception in AppMerge flows progression

DUseSunHttpHandler=true weblogic.net.http.SOAPHttpsURLConnection Weblogic/Java HttpHandler issues