I was trying to deploy the sample code that was provided for the statistics by Item example on: https://docs.appian.com/suite/help/20.2/rpa/tutorials/statistics-by-item.html
I have setup jdk 1.8 and maven 3.2. I have also setup the settings.xml via Appian configurator and set the profile tag in the pom.xml to point to the correct nexus repository.
When I do: mvn clean deploy, I am getting this below error:
Running com.novayre.jidoka.robot.tutorial.CalendarTest Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.137 sec <<< FAILURE! parseCalendarHeading(com.novayre.jidoka.robot.tutorial.CalendarTest) Time elapsed: 0.053 sec <<< ERROR! java.time.format.DateTimeParseException: Text 'agosto de 2017' could not be parsed at index 0 at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2050) at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1952) at java.base/java.time.YearMonth.parse(YearMonth.java:296) at com.novayre.jidoka.robot.tutorial.CalendarTest.parseCalendarHeading(CalendarTest.java:25) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) Results : Tests in error: parseCalendarHeading(com.novayre.jidoka.robot.tutorial.CalendarTest): Text 'agosto de 2017' could not be parsed at index 0
Discussion posts and replies are publicly visible
He gives the same error to me too, but by running the robot on the trivago website.
The error occurs because in the com.novayre.jidoka.robot.tutorial class. CalendarTest makes the following reference:
@Test public void parseCalendarHeading() throws ParseException {
String heading = "Agosto de 2017".toLowerCase(); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MMMM 'de' y"); LocalDate date = YearMonth.parse(heading, formatter).atDay(1); assertEquals(date, LocalDate.of(2017, 8, 1)); }
Please comment it if you want and try it again:
@Test public void parseCalendarHeading() throws ParseException {// String heading = "Agosto de 2017".toLowerCase();// // DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MMMM 'de' y");// LocalDate date = YearMonth.parse(heading, formatter).atDay(1);// // assertEquals(date, LocalDate.of(2017, 8, 1)); }
Enough ChatGPT for today