Skip to content

Commit

Permalink
add test for encoding (fixes #106, via #110)
Browse files Browse the repository at this point in the history
  • Loading branch information
baev authored Jul 19, 2017
1 parent eae5d23 commit 2326f91
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,18 @@ public void shouldUseFixtureDescriptions() throws Exception {
.containsExactlyInAnyOrder("Set up method with description");
}

@Feature("Basic framework support")
@Story("Descriptions")
@Issue("106")
@Test
public void shouldProcessCyrillicDescriptions() throws Exception {
runTestNgSuites("suites/gh-106.xml");

assertThat(results.getTestResults())
.extracting(ExecutableItem::getName)
.containsExactlyInAnyOrder("Тест с описанием на русском языке");
}

@Step("Run testng suites")
private void runTestNgSuites(String... suites) {
final ClassLoader classLoader = getClass().getClassLoader();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package io.qameta.allure.testng.samples;

import org.testng.annotations.Test;

/**
* @author charlie (Dmitry Baev).
*/
public class CyrillicDescriptions {

@Test(description = "Тест с описанием на русском языке")
public void testWithCyrillicDescription() throws Exception {
}
}
10 changes: 10 additions & 0 deletions allure-testng/src/test/resources/suites/gh-106.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<suite name="Github Issues">
<test name="gh-106">
<classes>
<class name="io.qameta.allure.testng.samples.CyrillicDescriptions"/>
</classes>
</test>
</suite>

0 comments on commit 2326f91

Please sign in to comment.