Error in jms example

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error in jms example

Claudia
[RemoteTestNG] detected TestNG version 6.11.0
16:19:28,154 INFO  tContextBootstrapper| Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@275710fc, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@525f1e4e, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@75f9eccc, org.springframework.test.context.support.DirtiesContextTestExecutionListener@52aa2946]
16:19:28,454 INFO  icApplicationContext| Refreshing org.springframework.context.support.GenericApplicationContext@4df50bcc: startup date [Tue Nov 14 16:19:28 COT 2017]; root of context hierarchy
16:19:28,685 INFO         citrus.Citrus| Unable to locate Citrus application properties
16:19:28,769 INFO  BeanDefinitionReader| Loading XML bean definitions from URL [file:/C:/Users/c.arias/Downloads/citrus-samples-master/sample-jms/target/classes/citrus-context.xml]
16:19:29,570 DEBUG BeanDefinitionReader| Loaded 6 bean definitions from location pattern [classpath*:citrus-context.xml]
16:19:31,102 INFO  port.LoggingReporter|
16:19:31,102 INFO  port.LoggingReporter| ------------------------------------------------------------------------
16:19:31,102 INFO  port.LoggingReporter|        .__  __                      
16:19:31,102 INFO  port.LoggingReporter|   ____ |__|/  |________ __ __  ______
16:19:31,102 INFO  port.LoggingReporter| _/ ___\|  \   __\_  __ \  |  \/  ___/
16:19:31,102 INFO  port.LoggingReporter| \  \___|  ||  |  |  | \/  |  /\___ \
16:19:31,111 INFO  port.LoggingReporter|  \___  >__||__|  |__|  |____//____  >
16:19:31,111 INFO  port.LoggingReporter|      \/                           \/
16:19:31,111 INFO  port.LoggingReporter|
16:19:31,111 INFO  port.LoggingReporter| C I T R U S  T E S T S  2.7.3-SNAPSHOT
16:19:31,111 INFO  port.LoggingReporter|
16:19:31,112 INFO  port.LoggingReporter| ------------------------------------------------------------------------
16:19:31,112 DEBUG port.LoggingReporter| BEFORE TEST SUITE
16:19:31,112 INFO  port.LoggingReporter|
16:19:31,112 INFO  port.LoggingReporter|
16:19:31,112 INFO  port.LoggingReporter| BEFORE TEST SUITE: SUCCESS
16:19:31,112 INFO  port.LoggingReporter| ------------------------------------------------------------------------
16:19:31,112 INFO  port.LoggingReporter|
16:19:31,140 DEBUG t.TestContextFactory| Created new test context - using global variables: '{}'
16:19:31,202 INFO  port.LoggingReporter|
16:19:31,202 INFO  port.LoggingReporter| ------------------------------------------------------------------------
16:19:31,202 DEBUG port.LoggingReporter| STARTING TEST TodoListIT.testAddTodoEntry <com.consol.citrus.samples.todolist>
16:19:31,202 INFO  port.LoggingReporter|
16:19:31,202 DEBUG      citrus.TestCase| Initializing test case
16:19:31,202 DEBUG  context.TestContext| Setting variable: todoName with value: 'todo_2549'
16:19:31,202 DEBUG  context.TestContext| Setting variable: todoDescription with value: 'Description: todo_2549'
16:19:31,202 DEBUG      citrus.TestCase| Global variables:
16:19:31,202 DEBUG      citrus.TestCase| todoName = todo_2549
16:19:31,202 DEBUG      citrus.TestCase| todoDescription = Description: todo_2549
16:19:31,202 DEBUG  context.TestContext| Setting variable: citrus.test.name with value: 'TodoListIT.testAddTodoEntry'
16:19:31,202 DEBUG  context.TestContext| Setting variable: citrus.test.package with value: 'com.consol.citrus.samples.todolist'
16:19:31,202 INFO  port.LoggingReporter|
16:19:31,202 DEBUG port.LoggingReporter| TEST STEP 1/5: send
16:19:31,202 DEBUG endpoint.JmsProducer| Sending JMS message to destination: 'jms.todo.inbound'
16:19:32,183 INFO  endpoint.JmsProducer| Message was sent to JMS destination: 'jms.todo.inbound'
16:19:32,184 INFO  port.LoggingReporter|
16:19:32,184 DEBUG port.LoggingReporter| TEST STEP 1/5 SUCCESS
16:19:32,184 INFO  port.LoggingReporter|
16:19:32,185 DEBUG port.LoggingReporter| TEST STEP 2/5: echo
16:19:32,185 INFO    actions.EchoAction| PRUEBA 1: $ {todoName}
16:19:32,186 INFO  port.LoggingReporter|
16:19:32,186 DEBUG port.LoggingReporter| TEST STEP 2/5 SUCCESS
16:19:32,186 INFO  port.LoggingReporter|
16:19:32,186 DEBUG port.LoggingReporter| TEST STEP 3/5: send
16:19:33,776 DEBUG ltCorrelationManager| Saving correlation key for 'citrus_message_correlator_todoListClient'
16:19:33,777 DEBUG  context.TestContext| Setting variable: citrus_message_correlator_todoListClient with value: 'citrus_message_id = 'd6510e54-19de-49fb-bfe5-d803ef230256''
16:19:33,777 DEBUG    client.HttpClient| Sending HTTP message to: 'http://localhost:8080/todolist'
16:19:33,777 DEBUG    client.HttpClient| Message to send:

16:19:33,835 DEBUG ingClientInterceptor| Sending Http request message
16:19:34,057 DEBUG ingClientInterceptor| Received Http response message
16:19:34,057 INFO     client.HttpClient| HTTP message was sent to endpoint: 'http://localhost:8080/todolist'
16:19:34,073 DEBUG ltCorrelationManager| Saving correlated object for 'citrus_message_id = 'd6510e54-19de-49fb-bfe5-d803ef230256''
16:19:34,073 INFO  port.LoggingReporter|
16:19:34,073 DEBUG port.LoggingReporter| TEST STEP 3/5 SUCCESS
16:19:34,073 INFO  port.LoggingReporter|
16:19:34,073 DEBUG port.LoggingReporter| TEST STEP 4/5: receive
16:19:34,073 DEBUG ngCorrelationManager| Get correlation key for 'citrus_message_correlator_todoListClient'
16:19:34,073 DEBUG ltCorrelationManager| Finding correlated object for 'citrus_message_id = 'd6510e54-19de-49fb-bfe5-d803ef230256''
16:19:34,073 DEBUG ageValidatorRegistry| Found 4 message validators for message type: XHTML
16:19:34,073 DEBUG ssageHeaderValidator| Start message header validation ...
16:19:34,088 DEBUG ssageHeaderValidator| Validating header element: citrus_http_status_code='200': OK.
16:19:34,088 DEBUG ssageHeaderValidator| Validating header element: citrus_http_reason_phrase='OK': OK.
16:19:34,088 INFO  ssageHeaderValidator| Message header validation successful: All values OK
16:19:34,173 DEBUG mXmlMessageValidator| Start XML message validation ...
16:19:34,198 DEBUG    xml.XmlConfigurer| Found DOMImplementationLS: org.apache.xerces.dom.CoreDOMImplementationImpl@2d6aca33
16:19:34,198 DEBUG    xml.XmlConfigurer| Found DOMImplementationLS: org.apache.xerces.dom.DOMImplementationImpl@21ab988f
16:19:34,198 DEBUG    xml.XmlConfigurer| Found DOMImplementationLS: org.apache.xerces.dom.PSVIDOMImplementationImpl@29314cc9
16:19:34,198 DEBUG    xml.XmlConfigurer| Found DOMImplementationLS: org.apache.xerces.impl.xs.XSImplementationImpl@4e38d975
16:19:34,198 DEBUG    xml.XmlConfigurer| Using DOMImplementationLS: org.apache.xerces.dom.CoreDOMImplementationImpl
[Error] :72:21: Attribute value "30911e6c-59c5-4371-872c-88ba2f7896d4" of type ID must be an NCName when namespaces are enabled.
[Error] :74:63: Attribute value "30911e6c-59c5-4371-872c-88ba2f7896d4" of type ID must be an NCName when namespaces are enabled.
[Error] :78:21: Attribute "action" is required and must be specified for element type "form".
[Error] :81:41: Attribute "placeholder" must be declared for element type "input".
[Error] :86:10: Attribute "cols" is required and must be specified for element type "textarea".
[Error] :86:10: Attribute "placeholder" must be declared for element type "textarea".
16:19:34,375 INFO  mXmlMessageValidator| XML message validation successful: All values OK
16:19:34,391 DEBUG pathMessageValidator| Start XPath element validation ...
[Error] :72:21: Attribute value "30911e6c-59c5-4371-872c-88ba2f7896d4" of type ID must be an NCName when namespaces are enabled.
[Error] :74:63: Attribute value "30911e6c-59c5-4371-872c-88ba2f7896d4" of type ID must be an NCName when namespaces are enabled.
[Error] :78:21: Attribute "action" is required and must be specified for element type "form".
[Error] :81:41: Attribute "placeholder" must be declared for element type "input".
[Error] :86:10: Attribute "cols" is required and must be specified for element type "textarea".
[Error] :86:10: Attribute "placeholder" must be declared for element type "textarea".
16:19:34,519 INFO      xpath.XPathUtils| Created default xpath factory org.apache.xpath.jaxp.XPathFactoryImpl@231baf51
16:19:34,704 INFO      xpath.XPathUtils| Created default xpath factory org.apache.xpath.jaxp.XPathFactoryImpl@213860b8
16:19:34,719 INFO  port.LoggingReporter|
16:19:34,719 ERROR port.LoggingReporter| TEST FAILED TodoListIT.testAddTodoEntry <com.consol.citrus.samples.todolist> Nested exception is:
com.consol.citrus.exceptions.ValidationException: Validation failed: Values not equal for element '(//xh:li[@class='list-group-item']/xh:span)[last()]', expected 'todo_2549' but was 'todo_9710'
        at com.consol.citrus.validation.ValidationUtils.validateValues(ValidationUtils.java:139)
        at com.consol.citrus.validation.xml.XpathMessageValidator.validateMessage(XpathMessageValidator.java:112)
        at com.consol.citrus.validation.xhtml.XhtmlXpathMessageValidator.validateMessage(XhtmlXpathMessageValidator.java:40)
        at com.consol.citrus.validation.xhtml.XhtmlXpathMessageValidator.validateMessage(XhtmlXpathMessageValidator.java:29)
        at com.consol.citrus.validation.AbstractMessageValidator.validateMessage(AbstractMessageValidator.java:46)
        at com.consol.citrus.actions.ReceiveMessageAction.validateMessage(ReceiveMessageAction.java:227)
        at com.consol.citrus.actions.ReceiveMessageAction.doExecute(ReceiveMessageAction.java:128)
        at com.consol.citrus.actions.AbstractTestAction.execute(AbstractTestAction.java:42)
        at com.consol.citrus.dsl.actions.DelegatingTestAction.doExecute(DelegatingTestAction.java:54)
        at com.consol.citrus.actions.AbstractTestAction.execute(AbstractTestAction.java:42)
        at com.consol.citrus.TestCase.executeAction(TestCase.java:222)
        at com.consol.citrus.TestCase.doExecute(TestCase.java:141)
        at com.consol.citrus.actions.AbstractTestAction.execute(AbstractTestAction.java:42)
        at com.consol.citrus.Citrus.run(Citrus.java:281)
        at com.consol.citrus.dsl.testng.TestNGCitrusTest.invokeTestMethod(TestNGCitrusTest.java:132)
        at com.consol.citrus.dsl.testng.TestNGCitrusTestDesigner.invokeTestMethod(TestNGCitrusTestDesigner.java:73)
        at com.consol.citrus.dsl.testng.TestNGCitrusTest.run(TestNGCitrusTest.java:110)
        at com.consol.citrus.dsl.testng.TestNGCitrusTest.run(TestNGCitrusTest.java:56)
        at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:221)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:657)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
        at org.testng.TestRunner.privateRun(TestRunner.java:744)
        at org.testng.TestRunner.run(TestRunner.java:602)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
        at org.testng.SuiteRunner.run(SuiteRunner.java:289)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
        at org.testng.TestNG.runSuites(TestNG.java:1144)
        at org.testng.TestNG.run(TestNG.java:1115)
        at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
        at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
        at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: java.lang.IllegalArgumentException: Values not equal for element '(//xh:li[@class='list-group-item']/xh:span)[last()]', expected 'todo_2549' but was 'todo_9710'
        at org.springframework.util.Assert.isTrue(Assert.java:92)
        at com.consol.citrus.validation.ValidationUtils.validateValues(ValidationUtils.java:110)
        ... 38 more
16:19:34,719 INFO  port.LoggingReporter| ------------------------------------------------------------------------
16:19:34,719 INFO  port.LoggingReporter|
FAILED: testAddTodoEntry
com.consol.citrus.exceptions.TestCaseFailedException: Test case failed
        at com.consol.citrus.TestCase.executeAction(TestCase.java:229)
        at com.consol.citrus.TestCase.doExecute(TestCase.java:141)
        at com.consol.citrus.actions.AbstractTestAction.execute(AbstractTestAction.java:42)
        at com.consol.citrus.Citrus.run(Citrus.java:281)
        at com.consol.citrus.dsl.testng.TestNGCitrusTest.invokeTestMethod(TestNGCitrusTest.java:132)
        at com.consol.citrus.dsl.testng.TestNGCitrusTestDesigner.invokeTestMethod(TestNGCitrusTestDesigner.java:73)
        at com.consol.citrus.dsl.testng.TestNGCitrusTest.run(TestNGCitrusTest.java:110)
        at com.consol.citrus.dsl.testng.TestNGCitrusTest.run(TestNGCitrusTest.java:56)
        at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:221)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:657)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
        at org.testng.TestRunner.privateRun(TestRunner.java:744)
        at org.testng.TestRunner.run(TestRunner.java:602)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
        at org.testng.SuiteRunner.run(SuiteRunner.java:289)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
        at org.testng.TestNG.runSuites(TestNG.java:1144)
        at org.testng.TestNG.run(TestNG.java:1115)
        at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114)
        at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
        at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: com.consol.citrus.exceptions.ValidationException: Validation failed: Values not equal for element '(//xh:li[@class='list-group-item']/xh:span)[last()]', expected 'todo_2549' but was 'todo_9710'
        at com.consol.citrus.validation.ValidationUtils.validateValues(ValidationUtils.java:139)
        at com.consol.citrus.validation.xml.XpathMessageValidator.validateMessage(XpathMessageValidator.java:112)
        at com.consol.citrus.validation.xhtml.XhtmlXpathMessageValidator.validateMessage(XhtmlXpathMessageValidator.java:40)
        at com.consol.citrus.validation.xhtml.XhtmlXpathMessageValidator.validateMessage(XhtmlXpathMessageValidator.java:29)
        at com.consol.citrus.validation.AbstractMessageValidator.validateMessage(AbstractMessageValidator.java:46)
        at com.consol.citrus.actions.ReceiveMessageAction.validateMessage(ReceiveMessageAction.java:227)
        at com.consol.citrus.actions.ReceiveMessageAction.doExecute(ReceiveMessageAction.java:128)
        at com.consol.citrus.actions.AbstractTestAction.execute(AbstractTestAction.java:42)
        at com.consol.citrus.dsl.actions.DelegatingTestAction.doExecute(DelegatingTestAction.java:54)
        at com.consol.citrus.actions.AbstractTestAction.execute(AbstractTestAction.java:42)
        at com.consol.citrus.TestCase.executeAction(TestCase.java:222)
        ... 28 more
Caused by: java.lang.IllegalArgumentException: Values not equal for element '(//xh:li[@class='list-group-item']/xh:span)[last()]', expected 'todo_2549' but was 'todo_9710'
        at org.springframework.util.Assert.isTrue(Assert.java:92)
        at com.consol.citrus.validation.ValidationUtils.validateValues(ValidationUtils.java:110)
        ... 38 more


===============================================
    Default test
    Tests run: 1, Failures: 1, Skips: 0
===============================================

16:19:34,801 INFO  port.LoggingReporter|
16:19:34,801 INFO  port.LoggingReporter| ------------------------------------------------------------------------
16:19:34,801 DEBUG port.LoggingReporter| AFTER TEST SUITE
16:19:34,801 INFO  port.LoggingReporter|
16:19:34,801 INFO  port.LoggingReporter|
16:19:34,801 INFO  port.LoggingReporter| AFTER TEST SUITE: SUCCESS
16:19:34,801 INFO  port.LoggingReporter| ------------------------------------------------------------------------
16:19:34,801 INFO  port.LoggingReporter|
16:19:34,801 INFO  port.LoggingReporter| ------------------------------------------------------------------------
16:19:34,801 INFO  port.LoggingReporter|
16:19:34,801 INFO  port.LoggingReporter| CITRUS TEST RESULTS
16:19:34,801 INFO  port.LoggingReporter|
16:19:34,801 INFO  port.LoggingReporter|  TodoListIT.testAddTodoEntry .................................... FAILED
16:19:34,801 INFO  port.LoggingReporter|  FAILURE: Caused by: ValidationException: Validation failed: Values not equal for element '(//xh:li[@class='list-group-item']/xh:span)[last()]', expected 'todo_2549' but was 'todo_9710'
16:19:34,801 INFO  port.LoggingReporter|
16:19:34,801 INFO  port.LoggingReporter| TOTAL: 1
16:19:34,801 DEBUG port.LoggingReporter| SKIPPED: 0 (0.0%)
16:19:34,801 INFO  port.LoggingReporter| FAILED: 1 (100.0%)
16:19:34,801 INFO  port.LoggingReporter| SUCCESS: 0 (0.0%)
16:19:34,801 INFO  port.LoggingReporter|
16:19:34,801 INFO  port.LoggingReporter| ------------------------------------------------------------------------
16:19:34,801 DEBUG  report.HtmlReporter| Generating HTML test report
16:19:34,801 DEBUG       util.FileUtils| Reading file resource: 'test-detail.html' (encoding is 'windows-1252')
16:19:34,848 DEBUG       util.FileUtils| Reading file resource: 'test-report.html' (encoding is 'windows-1252')
16:19:34,848 INFO   report.HtmlReporter| Generated HTML test report: target\citrus-reports\citrus-test-results.html

===============================================
Default suite
Total tests run: 1, Failures: 1, Skips: 0
===============================================

16:19:35,169 INFO  icApplicationContext| Closing org.springframework.context.support.GenericApplicationContext@4df50bcc: startup date [Tue Nov 14 16:19:28 COT 2017]; root of context hierarchy







Good Morning,

When I run the example of citrus framework of jms I  am getting these errors:

[Error]: 72: 21: Attribute value "30911e6c-59c5-4371-872c-88ba2f7896d4" of type ID must be an NCName when namespaces are enabled.
[Error]: 74: 63: Attribute value "30911e6c-59c5-4371-872c-88ba2f7896d4" of type ID must be an NCName when namespaces are enabled.
[Error]: 78: 21: Attribute "action" is required and must be specified for element type "form".
[Error]: 81: 41: Attribute "placeholder" must be declared for element type "input".
[Error]: 86: 10: Attribute "cols" is required and must be specified for element type "textarea".
[Error]: 86: 10: Attribute "placeholder" must be declared for element type "textarea".
16: 19: 34,375 INFO mXmlMessageValidator | XML message validation successful: All values ​​OK
16: 19: 34,391 DEBUG pathMessageValidator | Start XPath element validation ...
[Error]: 72: 21: Attribute value "30911e6c-59c5-4371-872c-88ba2f7896d4" of type ID must be an NCName when namespaces are enabled.
[Error]: 74: 63: Attribute value "30911e6c-59c5-4371-872c-88ba2f7896d4" of type ID must be an NCName when namespaces are enabled.
[Error]: 78: 21: Attribute "action" is required and must be specified for element type "form".
[Error]: 81: 41: Attribute "placeholder" must be declared for element type "input".
[Error]: 86: 10: Attribute "cols" is required and must be specified for element type "textarea".
[Error]: 86: 10: Attribute "placeholder" must be declared for element type "textarea".

Why do these errors come out?

Thank you very much.

Reply | Threaded
Open this post in threaded view
|

Re: Error in jms example

Christoph Deppisch
Administrator
The sample test should remove all todo entries before the test so you can execute the test multiple times. The test is not able to operate when another todo entry has already been added to the list of todo entries.