I am using IntelliJ IDEA 12.0.4. Do some tests. When I run one using the JUnit4 framework, my assertion error looks like this:
java.lang.AssertionError: Status should be: expected [true] but found [false]
If I use TestNG, it looks like this:
java.lang.AssertionError: Status should be: §µЂЅѕІє expected [true] but found [false]
All other Cyrillic outputs work fine on both frameworks, only the approval text will not.
Encoding project files installed in UTF-8.
Update:
For example, a simple WebDriver test. I am using TestNG and IE.
import org.testng.Assert;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import java.util.concurrent.TimeUnit;
public class SeleniumExample {
protected WebDriver driver;
protected String baseUrl;
@BeforeSuite
public void setUp() throws Exception
{
driver = new InternetExplorerDriver();
baseUrl = "http://www.google.com";
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
@DataProvider
public Object[][] TestData() {
return new Object[][]{
{""},
};
}
@Test(description = "Create_InvestProjectRequest", dataProvider = "TestData")
public void Test(String s) {
driver.get(baseUrl);
Assert.assertTrue(driver.getTitle().contains(s), "");
}
@AfterSuite
public void tearDown() throws Exception {
driver.quit();
}
}
In the results of the test result, I see:
java.lang.AssertionError: ћ € ± є ° Expected: true Actual: false
And one more problem: if I use the Cyrillic alphabet in the DataProvider, then in the test tree I see Test ("ћ € ") instead of Test ("Google")