-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi I'm writing JUnit tests for classes in some web application and one of the classes calls Executions.getCurrent() which returns null and I end up with a null pointer exception. How can I solve this? Is there a way to create or mock the current execution?
When you test the GUI you can better use selenium or otherwise for testing purposes check if your execution isn't null so you know that you are in a test case.
I've done this also when you call execution params, witch are null when you are running testcases.
greetz chill.
When you run a JUnit Testcase, you are running it in JUnit runtime, it is not in a application server/zk environment, so you are not able to get a Execution.
Can you please give more code for below issue ,If you are not using Server here so it will throw Null Pointer exception because Executions.getCurrent()
for a web application you have to test this in Jetty Server then it should work
Asked: 2014-04-14 09:28:37 +0800
Seen: 30 times
Last updated: Apr 16 '14
Controller updating UI every minute
annotation porting from zk 3.6.2 to 6.5.3
How to customize "Processing..." message
JBoss AS 7.1 +Spring+ZK+DHtmlLayoutServlet
Portallayout, portalchildren ordering storage, possible bug
Sniffer Based Monitoring of ZK Apps
The server is temporarily out of service. (syntax error (SyntaxError))