[JBoss JIRA] (ISPN-5941) Ensure testability of management console
by Jiří Holuša (JIRA)
Jiří Holuša created ISPN-5941:
---------------------------------
Summary: Ensure testability of management console
Key: ISPN-5941
URL: https://issues.jboss.org/browse/ISPN-5941
Project: Infinispan
Issue Type: Task
Components: Console
Reporter: Jiří Holuša
Assignee: Vladimir Blagojevic
Since we're planning to test ISPN management console using Selenium (Selenide more specifically), we would appreciate taking more attention to giving ID's to page elements that would be helpful for testing.
Just an example, how it could simplify our test development as a motivation. Currently (ISPN 8.1.0.Alpha2), in the detail of cache container page with list of caches, the shortest way (even with Java 8) how to get (for testing purposes) names of caches, is:
{code}
List<String> caches = $$("#cache-cards > div").filterBy(attribute("ng-show", "cache.show"))
.stream().map(element -> element.find("a").text()).collect(Collectors.toList());
{code}
The time to figure out this "query" was about 2 minutes (For the first time. I know, very subjective, but as an example)
Now suppose we would add class="cacheName" to <a> element of the corresponding cache card:
{code}
List<String> caches = $$("#cache-cards a.cacheName").stream().map(element -> element.text()).collect(Collectors.toList());
{code}
Time to come up with such an "query" would be around 5 seconds :)
I tried to come up with some generic guidelines about where to put some id/class, feel free to add some:
* to every input/select field
* especially with checkboxes which are differentiated with <label>
* generally to <span> or any (text?) element which can change it's value, which is dependent on some state of the cache/server/...
Of course, you cannot be 100% successful with giving the id/class to every useful place, but every single place, which you select correctly, simplifies and speeds up the test development. Probably also a good idea to come up with some naming convention.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 5 months
[JBoss JIRA] (ISPN-5939) RemoteListenerWithDslFilterTest.testEventFilter and NonIndexedCacheRemoteListenerWithDslFilterTest.testEventFilter fail randomly
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-5939?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration updated ISPN-5939:
------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1279877
Bugzilla Update: Perform
> RemoteListenerWithDslFilterTest.testEventFilter and NonIndexedCacheRemoteListenerWithDslFilterTest.testEventFilter fail randomly
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-5939
> URL: https://issues.jboss.org/browse/ISPN-5939
> Project: Infinispan
> Issue Type: Bug
> Components: Test Suite - Server
> Reporter: Roman Macor
>
> RemoteListenerWithDslFilterTest.testEventFilter and NonIndexedCacheRemoteListenerWithDslFilterTest.testEventFilter fail randomly with:
> Error Message
> expected:<2> but was:<0>
> Stacktrace
> java.lang.AssertionError: expected:<2> but was:<0>
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.failNotEquals(Assert.java:743)
> at org.junit.Assert.assertEquals(Assert.java:118)
> at org.junit.Assert.assertEquals(Assert.java:555)
> at org.junit.Assert.assertEquals(Assert.java:542)
> at org.infinispan.client.hotrod.event.RemoteListenerWithDslFilterTest.testEventFilter(RemoteListenerWithDslFilterTest.java:155)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> at org.testng.TestRunner.privateRun(TestRunner.java:767)
> at org.testng.TestRunner.run(TestRunner.java:617)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
> at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
> at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
> at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 5 months
[JBoss JIRA] (ISPN-5939) RemoteListenerWithDslFilterTest.testEventFilter and NonIndexedCacheRemoteListenerWithDslFilterTest.testEventFilter fail randomly
by Roman Macor (JIRA)
Roman Macor created ISPN-5939:
---------------------------------
Summary: RemoteListenerWithDslFilterTest.testEventFilter and NonIndexedCacheRemoteListenerWithDslFilterTest.testEventFilter fail randomly
Key: ISPN-5939
URL: https://issues.jboss.org/browse/ISPN-5939
Project: Infinispan
Issue Type: Bug
Components: Test Suite - Server
Reporter: Roman Macor
RemoteListenerWithDslFilterTest.testEventFilter and NonIndexedCacheRemoteListenerWithDslFilterTest.testEventFilter fail randomly with:
Error Message
expected:<2> but was:<0>
Stacktrace
java.lang.AssertionError: expected:<2> but was:<0>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:555)
at org.junit.Assert.assertEquals(Assert.java:542)
at org.infinispan.client.hotrod.event.RemoteListenerWithDslFilterTest.testEventFilter(RemoteListenerWithDslFilterTest.java:155)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 5 months
[JBoss JIRA] (ISPN-5938) ClusterListenerReplInitialStateTest.testPrimaryOwnerGoesDownAfterBackupRaisesEvent fails randomly
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-5938?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration updated ISPN-5938:
------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1279815
Bugzilla Update: Perform
> ClusterListenerReplInitialStateTest.testPrimaryOwnerGoesDownAfterBackupRaisesEvent fails randomly
> -------------------------------------------------------------------------------------------------
>
> Key: ISPN-5938
> URL: https://issues.jboss.org/browse/ISPN-5938
> Project: Infinispan
> Issue Type: Bug
> Components: Test Suite - Core
> Reporter: Roman Macor
>
> ClusterListenerReplInitialStateTest.testPrimaryOwnerGoesDownAfterBackupRaisesEvent fails randomly with:
> Stacktrace
> java.util.concurrent.TimeoutException
> at java.util.concurrent.FutureTask.get(FutureTask.java:205)
> at org.infinispan.notifications.cachelistener.cluster.ClusterListenerReplTest.testPrimaryOwnerGoesDownAfterBackupRaisesEvent(ClusterListenerReplTest.java:123)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> at org.testng.TestRunner.privateRun(TestRunner.java:767)
> at org.testng.TestRunner.run(TestRunner.java:617)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
> at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
> at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
> at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 5 months
[JBoss JIRA] (ISPN-5938) ClusterListenerReplInitialStateTest.testPrimaryOwnerGoesDownAfterBackupRaisesEvent fails randomly
by Roman Macor (JIRA)
Roman Macor created ISPN-5938:
---------------------------------
Summary: ClusterListenerReplInitialStateTest.testPrimaryOwnerGoesDownAfterBackupRaisesEvent fails randomly
Key: ISPN-5938
URL: https://issues.jboss.org/browse/ISPN-5938
Project: Infinispan
Issue Type: Bug
Components: Test Suite - Core
Reporter: Roman Macor
ClusterListenerReplInitialStateTest.testPrimaryOwnerGoesDownAfterBackupRaisesEvent fails randomly with:
Stacktrace
java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at org.infinispan.notifications.cachelistener.cluster.ClusterListenerReplTest.testPrimaryOwnerGoesDownAfterBackupRaisesEvent(ClusterListenerReplTest.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:37)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:368)
at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 5 months