本文整理汇总了Java中ru.yandex.qatools.allure.annotations.Features类的典型用法代码示例。如果您正苦于以下问题:Java Features类的具体用法?Java Features怎么用?Java Features使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Features类属于ru.yandex.qatools.allure.annotations包,在下文中一共展示了Features类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testGoogle
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
@TestCaseId("TC_GMail_001")
@Description("To verify the working of GMail link from Google Home Page using JavaScript Executor")
@Features("GMail Page")
@Test(dataProvider="excelSheetNameAsMethodName",dataProviderClass=ExcelDataProvider.class)
public void testGoogle(@Parameter("Testcase ID")String testCaseID,@Parameter("Email ID")String emailID, @Parameter("Password")String password) throws Exception
{
/* googleHomePage()
.verifyPageTitle()
.clickonGmailLink()
.gmailPage()
.enterEmailID(emailID);*/
System.out.println("TestCase ID: "+testCaseID);
System.out.println("EmailID "+emailID);
System.out.println("Password: "+password);
}
示例2: testAllowConnection
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
@Test
@Features("issues/327")
public void testAllowConnection() {
TestRestTemplate template = new TestRestTemplate();
ResponseEntity<String> entity = template.postForEntity("http://localhost:5555/connectionregistry/socket/google.com/443", null, String.class);
assertTrue(entity.getStatusCode().is2xxSuccessful());
entity = template.getForEntity("http://localhost:5555/connectionregistry/", String.class);
assertTrue(entity.getStatusCode().is2xxSuccessful());
assertEquals(singletonList("443"), JsonPath.read(entity.getBody(), "$.sockets[?(@.host == 'google.com')].port"));
assertEquals(singletonList(0), JsonPath.read(entity.getBody(), "$.sockets[?(@.host == 'google.com')].status"));
template.delete("http://localhost:5555/connectionregistry/socket/google.com/443");
entity = template.getForEntity("http://localhost:5555/connectionregistry/", String.class);
assertTrue(entity.getStatusCode().is2xxSuccessful());
assertEquals(singletonList("443"), JsonPath.read(entity.getBody(), "$.sockets[?(@.host == 'google.com')].port"));
assertEquals(singletonList(-1), JsonPath.read(entity.getBody(), "$.sockets[?(@.host == 'google.com')].status"));
}
示例3: testSetConnectionDelay
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
@Test
@Features({"issues/327","issues/219"})
public void testSetConnectionDelay() {
TestRestTemplate template = new TestRestTemplate();
ResponseEntity<String> entity = template.postForEntity("http://localhost:5555/connectionregistry/socket/google.com/443", "10", String.class);
assertTrue(entity.getStatusCode().is2xxSuccessful());
entity = template.getForEntity("http://localhost:5555/connectionregistry/", String.class);
assertTrue(entity.getStatusCode().is2xxSuccessful());
assertEquals(singletonList("443"), JsonPath.read(entity.getBody(), "$.sockets[?(@.host == 'google.com')].port"));
assertEquals(singletonList(10), JsonPath.read(entity.getBody(), "$.sockets[?(@.host == 'google.com')].status"));
template.delete("http://localhost:5555/connectionregistry/socket/google.com/443");
entity = template.getForEntity("http://localhost:5555/connectionregistry/", String.class);
assertTrue(entity.getStatusCode().is2xxSuccessful());
assertEquals(singletonList("443"), JsonPath.read(entity.getBody(), "$.sockets[?(@.host == 'google.com')].port"));
assertEquals(singletonList(-1), JsonPath.read(entity.getBody(), "$.sockets[?(@.host == 'google.com')].status"));
}
示例4: testAllowDataSource
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
@Test
@Features("issues/327")
public void testAllowDataSource() {
TestRestTemplate template = new TestRestTemplate();
ResponseEntity<String> entity = template.postForEntity("http://localhost:5555/connectionregistry/datasource/jdbc:data:source/user", null, String.class);
assertTrue(entity.getStatusCode().is2xxSuccessful());
entity = template.getForEntity("http://localhost:5555/connectionregistry/", String.class);
assertTrue(entity.getStatusCode().is2xxSuccessful());
assertEquals("jdbc:data:source", JsonPath.read(entity.getBody(), "$.dataSources[0].url"));
assertEquals("user", JsonPath.read(entity.getBody(), "$.dataSources[0].userName"));
assertEquals((Integer) 0, JsonPath.read(entity.getBody(), "$.dataSources[0].status"));
template.delete("http://localhost:5555/connectionregistry/datasource/jdbc:data:source/user");
entity = template.getForEntity("http://localhost:5555/connectionregistry/", String.class);
assertTrue(entity.getStatusCode().is2xxSuccessful());
assertEquals("jdbc:data:source", JsonPath.read(entity.getBody(), "$.dataSources[0].url"));
assertEquals("user", JsonPath.read(entity.getBody(), "$.dataSources[0].userName"));
assertEquals((Integer) (-1), JsonPath.read(entity.getBody(), "$.dataSources[0].status"));
}
示例5: testPersistent
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
@Test
@Features("issues/327")
public void testPersistent() {
TestRestTemplate template = new TestRestTemplate();
ResponseEntity<String> entity = template.postForEntity("http://localhost:5555/connectionregistry/persistent/", null, String.class);
assertTrue(entity.getStatusCode().is2xxSuccessful());
entity = template.getForEntity("http://localhost:5555/connectionregistry/", String.class);
assertTrue(entity.getStatusCode().is2xxSuccessful());
assertEquals(true, JsonPath.read(entity.getBody(), "$.persistent"));
template.delete("http://localhost:5555/connectionregistry/persistent/");
entity = template.getForEntity("http://localhost:5555/connectionregistry/", String.class);
assertTrue(entity.getStatusCode().is2xxSuccessful());
assertEquals(false, JsonPath.read(entity.getBody(), "$.persistent"));
}
示例6: testGetTopSql
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
@Test
@Features("issues/292")
public void testGetTopSql() throws Exception {
Sniffy.getGlobalSqlStats().clear();
executeStatement();
MockHttpServletResponse response = new MockHttpServletResponse();
MockHttpServletRequest request = MockMvcRequestBuilders.
get("/petclinic/" + SniffyServlet.TOP_SQL_URI_PREFIX).
buildRequest(servletContext);
request.setContextPath("/petclinic");
sniffyServlet.service(request, response);
assertEquals(HttpServletResponse.SC_OK, response.getStatus());
assertEquals("application/javascript", response.getContentType());
assertTrue(response.getContentAsByteArray().length > 0);
assertEquals(1, (int) JsonPath.read(response.getContentAsString(), "$.length()"));
assertEquals("SELECT 1 FROM DUAL", JsonPath.read(response.getContentAsString(), "$[0].sql"));
assertEquals(1, (int) JsonPath.read(response.getContentAsString(), "$[0].timer.count"));
}
示例7: testConnectWithDelayException
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
@Test
@Features({"issues/219"})
public void testConnectWithDelayException() throws Exception {
ConnectionsRegistry.INSTANCE.setSocketAddressStatus("localhost", 123, -10);
doNothing().when(SnifferSocketImpl.class, "sleepImpl", anyInt());
try {
sniffySocket.connect("localhost", 123);
fail();
} catch (ConnectException e) {
assertNotNull(e);
}
verifyPrivate(SnifferSocketImpl.class).invoke("sleepImpl", eq(10));
verifyNoMoreInteractions(delegate);
}
示例8: testLruGlobalSqlStats
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
@Test
@Features("issues/292")
public void testLruGlobalSqlStats() throws Exception {
Sniffy.getGlobalSqlStats().clear();
for (int i = 0; i < Sniffy.TOP_SQL_CAPACITY; i++) {
executeSelectStatements(i, 2 + i % 100);
}
assertEquals(Sniffy.TOP_SQL_CAPACITY, Sniffy.getGlobalSqlStats().size());
assertNotNull(Sniffy.getGlobalSqlStats().get(String.format("SELECT %d FROM DUAL", 0)));
executeSelectStatements(Sniffy.TOP_SQL_CAPACITY + 1000, 1);
assertEquals(Sniffy.TOP_SQL_CAPACITY, Sniffy.getGlobalSqlStats().size());
assertTrue(Sniffy.getGlobalSqlStats().containsKey(String.format("SELECT %d FROM DUAL", Sniffy.TOP_SQL_CAPACITY + 1000)));
assertTrue(Sniffy.getGlobalSqlStats().containsKey(String.format("SELECT %d FROM DUAL", 0)));
assertFalse(Sniffy.getGlobalSqlStats().containsKey(String.format("SELECT %d FROM DUAL", 1)));
}
示例9: testTopSqlCapacity
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
@Test
@Features("issues/292")
public void testTopSqlCapacity() {
SniffyConfiguration sniffyConfiguration = SniffyConfiguration.INSTANCE;
System.setProperty("io.sniffy.topSqlCapacity", "42");
sniffyConfiguration.loadSniffyConfiguration();
assertEquals(42, sniffyConfiguration.getTopSqlCapacity());
// incorrect value
System.setProperty("io.sniffy.topSqlCapacity", "bla");
sniffyConfiguration.loadSniffyConfiguration();
assertEquals(0, sniffyConfiguration.getTopSqlCapacity());
// default value
System.getProperties().remove("io.sniffy.topSqlCapacity");
sniffyConfiguration.loadSniffyConfiguration();
assertEquals(Sniffy.TOP_SQL_CAPACITY, sniffyConfiguration.getTopSqlCapacity());
}
示例10: testNormalizeInStatementStackOverflow
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
@Test
@Features("issues/331")
public void testNormalizeInStatementStackOverflow() {
assertEquals(
"select orders0_.customer_id as customer4_1_, orders0_.id as id1_, orders0_.id as id1_0_, orders0_.customer_id as customer4_1_0_, orders0_.description as descript2_1_0_, orders0_.orderId as orderId1_0_ from ORDERS orders0_ where orders0_.customer_id in (?)",
normalizeInStatement(
"select orders0_.customer_id as customer4_1_, orders0_.id as id1_, orders0_.id as id1_0_, orders0_.customer_id as customer4_1_0_, orders0_.description as descript2_1_0_, orders0_.orderId as orderId1_0_ from ORDERS orders0_ where orders0_.customer_id in (" +
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " +
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 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?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " +
"?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?" +
")")
);
}
示例11: getLabels
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
private List<Label> getLabels() {
final Method method = getMethod();
final List<Label> labels = new ArrayList<>();
labels.addAll(Allure1Utils.getLabels(method, Severity.class, Allure1Utils::createLabels));
labels.addAll(Allure1Utils.getLabels(method, Stories.class, Allure1Utils::createLabels));
labels.addAll(Allure1Utils.getLabels(method, Features.class, Allure1Utils::createLabels));
return labels;
}
示例12: testSomething
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
@Title("testcase")
@Description("testcase description")
@Issue("ISSUE-2")
@Issues(@Issue("ISSUE-22"))
@TestCaseId("TEST-1")
@Stories("story2")
@Features("feature2")
@Severity(SeverityLevel.CRITICAL)
@org.testng.annotations.Test
public void testSomething() {
}
示例13: getFeaturesAnnotation
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
private Features getFeaturesAnnotation(final String value) {
return new Features() {
@Override
public String[] value() {
return new String[]{value};
}
@Override
public Class<Features> annotationType() {
return Features.class;
}
};
}
示例14: loginWithoutCredentials
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
@Features("Login")
@Stories("Login without credentials")
@TestRailCaseID("33")
@Test
public void loginWithoutCredentials() throws Exception
{
loginPage.submitLogin("", "");
assertThat("Check error message.", loginPage.getAuthenticationError(),
is(equalTo(errorMessage)));
}
示例15: loginWithoutPassword
import ru.yandex.qatools.allure.annotations.Features; //导入依赖的package包/类
@Features("Login")
@Stories("Login without password")
@TestRailCaseID("34")
@Test
public void loginWithoutPassword() throws Exception
{
loginPage.submitLogin(ServerStaticGlobals.email, "");
assertThat("Check error message.", loginPage.getAuthenticationError(),
is(equalTo(errorMessage)));
}