initializationError when running Junit test in static


#1

I have been on a look as of late for a solution to my inquiry and I can’t appear to discover it. I am endeavoring to execute a basic test to run a JUnit test in static. When I attempt to execute the test I get the accompanying Failure.

java.lang.Exception: Method SimpleINt()should not be static.

I have JUnit 4 and hamcrest introduced and pathsbuilt.

package iMAP;

import org.junit.Test;

public class Test1 {

@Test
public static void SimpleINt ()
{
int i = 34;
System.out.println(i);
}
}

Thanks in Advance@ Tekslate


#2

I’m also getting same problem and i had some information that might be helps to you.
Click here to get more updates.