reportportal / agent-java-karate Goto Github PK
View Code? Open in Web Editor NEWKarate integration for ReportPortal
License: Apache License 2.0
Karate integration for ReportPortal
License: Apache License 2.0
Is your feature request related to a problem? Please describe.
Currently I set tags and attributes on the feature level in a feature file. Those tags/details are supposed to be applied to every test defined in that file.
The tags/attributes are published to ReportPortal, but only on the Test Suite level, not on Test level. This causes that a couple of widgets (i.. Component Health Check) cannot be used properly, as i.e. I cannot group test results by attributes - ReportPortal requires that those attributes are set on Test level, not Test Suite level.
Describe the solution you'd like
All tags/attributes which are assigned on Feature level should be set for Test Suite and Test objects.
Describe alternatives you've considered
Alternatively I can copy/paste all tags/attributes to every single test defined in a feature file. This would be a lot of redundant data and madness to maintain.
Additional context
N/A
Please, could you inform me how to do parallel execution with KarateReportPortalRunner, so, in karate documentation, it is written not to use the @RunWith when you want to run tests in parallel via CucumberRunner.parallel() ?
Is your feature request related to a problem? Please describe.
It is difficult to tell what part of the process ReportPortal is currently on.
For example if it is missing UUID , there is no feedback that a uuid is missing. The lib will just fail quietly.
Describe the solution you'd like
Add logs which appear in the pipeline that communicate the current activity and the progress.
eg.
Team,
For karate 0.9.3, reportPortalIo is not working. Could you please let us know, how to resolve this?
We are not able to integrate Report Portal with Karate Framework(API testing).
Please suggest options to make it feasible
Note: We have also tried with the below dependency with cucumber but no luck since the runner class is karate (Karate.class) and hence we need options to integrate karate with report portal
com.epam.reportportal agent-java-cucumber 4.0.0Please note that I installed all the RP dependencies and scripts are working fine.
Thanks for that.
I had another inquiry which is that karate-config.js file is not getting read by the sample project.
I put URL reference of the services in karate-config.js which I am calling through feature file like this
Scenario: create access token
Given url oauth1 + '.uk' + oauth2
And path '/token'
And form field client_id = '***'
And form field client_secret = ''
And form field grant_type = ''
When method post
Then status 200
Where oauth1 & oauth2 are the config value which are present in karate-config.js file.
While running the project I am getting below error:
�[31mjava.lang.RuntimeException: javascript evaluation failed: oauth1 + '.uk' + oauth2
Kindly suggest !
Describe the bug
Getting: ERROR c.e.r.utils.SubscriptionUtils - Start test item completed with error retrofit2.adapter.rxjava2.HttpException: HTTP 400
Error from SubscriptionUtils:
{"errorCode":4001,"message":"Incorrect Request. [Field 'name' should not contain only white spaces and shouldn't be empty. Field 'name' should have size from '1' to '1,024'.] "}
Wanted to know what is the configuration which i am missing?
Sample feature:
Feature:
@seconds
Scenario:
* def responseCheck =
"""
function getCurrentMinute() {
var now = new Date();
var seconds = now.getSeconds();
if (seconds > 45)
return seconds;
else
throw new Error("Seconds is less than 45");
}
"""
* def seconds = retry(5,5000,responseCheck)
* print seconds
Steps to Reproduce
Below is the configuration for Runner.
@test
void testParallel() {
Results results = Runner
.path("classpath:api")
.outputCucumberJson(true)
.hook(new ReportPortalHook())
.outputJunitXml(true)
.tags("~@ignore")
.parallel(threads);
}
Request being made to report-portal:
Request{method=POST, url=https://xxxxx.com/api/v2/xxxxx/item, headers=[Authorization:Bearer token], tags={class retrofit2.Invocation=com.epam.reportportal.service.ReportPortalClientV2.startTestItem() [StartTestItemRQ{codeRef='null', parameters=null, uniqueId='null', testCaseId='null', testCaseHash='null', launchUuid='626ee6f1-2ce1-4dfb-9d09-51cfecdf250b', type='STORY', retry=null, hasStats=true, name=''}]}}
Expected behavior
Report-portal should get details of tests.
Actual behavior
{"errorCode":4001,"message":"Incorrect Request. [Field 'name' should not contain only white spaces and shouldn't be empty. Field 'name' should have size from '1' to '1,024'.] "}
LOGS:
14:54:15.084 [] [rp-io-13] ERROR c.e.r.utils.SubscriptionUtils - Start test item completed with error
retrofit2.adapter.rxjava2.HttpException: HTTP 400
at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:57)
at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:38)
at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:48)
at io.reactivex.Observable.subscribe(Observable.java:12267)
at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35)
at io.reactivex.Observable.subscribe(Observable.java:12267)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
14:54:15.085 [] [rp-io-13] ERROR c.e.r.utils.SubscriptionUtils - Start test item completed with error
retrofit2.adapter.rxjava2.HttpException: HTTP 400
at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:57)
at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:38)
at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:48)
at io.reactivex.Observable.subscribe(Observable.java:12267)
at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35)
at io.reactivex.Observable.subscribe(Observable.java:12267)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
14:54:15.085 [] [rp-io-13] ERROR c.e.r.utils.SubscriptionUtils - Start test item completed with error
retrofit2.adapter.rxjava2.HttpException: HTTP 400
at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:57)
at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:38)
at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:48)
at io.reactivex.Observable.subscribe(Observable.java:12267)
at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35)
at io.reactivex.Observable.subscribe(Observable.java:12267)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
14:54:15.085 [] [rp-io-14] ERROR c.e.r.service.logs.LoggingSubscriber - [63] ReportPortal logging error
retrofit2.adapter.rxjava2.HttpException: HTTP 400
at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:57)
at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:38)
at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:48)
at io.reactivex.Observable.subscribe(Observable.java:12267)
at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35)
at io.reactivex.Observable.subscribe(Observable.java:12267)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
14:54:15.086 [] [rp-io-13] ERROR c.e.r.utils.SubscriptionUtils - [62] ReportPortal Finish test item execution error
retrofit2.adapter.rxjava2.HttpException: HTTP 400
at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:57)
at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:38)
at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:48)
at io.reactivex.Observable.subscribe(Observable.java:12267)
at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35)
at io.reactivex.Observable.subscribe(Observable.java:12267)
at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:38)
at io.reactivex.internal.schedulers.ScheduledDirectTask.call(ScheduledDirectTask.java:26)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Dependency versions
1.5.0.RC4 - karate-junit5
5.0.5 - agent-java-karate
Hi,
I am getting below issue while retrieving the database value using agent-java-karate
12:02:51.937 DEBUG o.s.j.s.JdbcUtils - main - JDBC driver has limited support for JDBC 4.1 'getObject(int, Class)' method
java.sql.SQLException: Conversion not supported for type java.lang.Object
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
at com.mysql.cj.jdbc.result.ResultSetImpl.getObject(ResultSetImpl.java:1475)
at org.springframework.jdbc.support.JdbcUtils.getResultSetValue(JdbcUtils.java:212)
at org.springframework.jdbc.core.SingleColumnRowMapper.getColumnValue(SingleColumnRowMapper.java:149)
at org.springframework.jdbc.core.SingleColumnRowMapper.mapRow(SingleColumnRowMapper.java:114)
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:94)
at org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.java:61)
at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:439)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:375)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:451)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:461)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:472)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:479)
I use spring framework to get the MSSQL or SQL values and it worked fine with latest karate version 0.9.2 but it is breaking using the agent.
Please suggest further. I am deeply stuck due to this.
@lexecon , @rahul267 , @avarabyeu
@rahul267
I tried running the maven project which is pointed to master but while running the sample project I am getting the below issue:
Feature: Quote generator
12:01:10.676 ERROR c.e.r.s.ReportPortal - main - Cannot build ReportPortal client
java.net.MalformedURLException: no protocol: yourinstancepleaseedit
at java.base/java.net.URL.(URL.java:627)
at java.base/java.net.URL.(URL.java:523)
at java.base/java.net.URL.(URL.java:470)
at com.epam.reportportal.service.ReportPortal$Builder.defaultClient(ReportPortal.java:274)
at com.epam.reportportal.service.ReportPortal$Builder.build(ReportPortal.java:233)
at com.epam.reportportal.cucumber.AbstractReporter.buildReportPortal(AbstractReporter.java:101)
at com.epam.reportportal.cucumber.AbstractReporter$1.get(AbstractReporter.java:71)
at com.epam.reportportal.cucumber.AbstractReporter$1.get(AbstractReporter.java:64)
at rp.com.google.common.base.Suppliers$MemoizingSupplier.get(Suppliers.java:120)
at com.epam.reportportal.cucumber.ScenarioReporter$1.get(ScenarioReporter.java:60)
at com.epam.reportportal.cucumber.ScenarioReporter$1.get(ScenarioReporter.java:53)
at rp.com.google.common.base.Suppliers$MemoizingSupplier.get(Suppliers.java:120)
at com.epam.reportportal.cucumber.ScenarioReporter.getRootItemId(ScenarioReporter.java:107)
at com.epam.reportportal.cucumber.AbstractReporter.beforeScenario(AbstractReporter.java:149)
at com.epam.reportportal.cucumber.AbstractReporter.startOfScenarioLifeCycle(AbstractReporter.java:322)
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:566)
at cucumber.runtime.Utils$1.call(Utils.java:40)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.Utils.invoke(Utils.java:34)
at cucumber.runtime.RuntimeOptions$1.invoke(RuntimeOptions.java:294)
at com.sun.proxy.$Proxy11.startOfScenarioLifeCycle(Unknown Source)
at cucumber.runtime.junit.JUnitReporter.startOfScenarioLifeCycle(JUnitReporter.java:238)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:39)
at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
at KarateReportPortalRunner.runChild(KarateReportPortalRunner.java:125)
at com.intuit.karate.junit4.Karate.runChild(Karate.java:37)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at com.intuit.karate.junit4.Karate.run(Karate.java:129)
at KarateReportPortalRunner.run(KarateReportPortalRunner.java:130)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
Warning: Nashorn engine is planned to be removed from a future JDK release
12:01:12.257 WARN c.i.karate - main - not a js function or feature file: read('classpath:karate-config.js') - [type: NULL, value: null]
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by cucumber.deps.com.thoughtworks.xstream.core.util.Fields (file:/Users/cex/.m2/repository/info/cukes/cucumber-jvm-deps/1.0.5/cucumber-jvm-deps-1.0.5.jar) to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of cucumber.deps.com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Scenario: Fetch random quote �[90m# feature/Test.feature:2�[0m
�[36mGiven �[0m�[36murl �[0m�[36m�[1m'http://jsonplaceholder.typicode.com/posts'�[0m �[90m# StepDefs.url(String)�[0m
�[36mGiven �[0m�[36mpath '1'�[0m
�[36mWhen �[0m�[36mmethod GET�[0m
�[36mThen �[0m�[36mstatus 200�[0m
12:01:12.760 ERROR c.e.r.s.ReportPortal - main - Cannot build ReportPortal client
java.net.MalformedURLException: no protocol: yourinstancepleaseedit
at java.base/java.net.URL.(URL.java:627)
at java.base/java.net.URL.(URL.java:523)
at java.base/java.net.URL.(URL.java:470)
at com.epam.reportportal.service.ReportPortal$Builder.defaultClient(ReportPortal.java:274)
at com.epam.reportportal.service.ReportPortal$Builder.build(ReportPortal.java:233)
at com.epam.reportportal.cucumber.AbstractReporter.buildReportPortal(AbstractReporter.java:101)
at com.epam.reportportal.cucumber.AbstractReporter$1.get(AbstractReporter.java:71)
at com.epam.reportportal.cucumber.AbstractReporter$1.get(AbstractReporter.java:64)
at rp.com.google.common.base.Suppliers$MemoizingSupplier.get(Suppliers.java:120)
at com.epam.reportportal.cucumber.ScenarioReporter.afterLaunch(ScenarioReporter.java:116)
at com.epam.reportportal.cucumber.AbstractReporter.close(AbstractReporter.java:365)
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:566)
at cucumber.runtime.Utils$1.call(Utils.java:40)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.Utils.invoke(Utils.java:34)
at cucumber.runtime.RuntimeOptions$1.invoke(RuntimeOptions.java:294)
at com.sun.proxy.$Proxy11.close(Unknown Source)
at cucumber.runtime.junit.JUnitReporter.close(JUnitReporter.java:232)
at KarateReportPortalRunner.run(KarateReportPortalRunner.java:132)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
com.epam.reportportal.exception.InternalReportPortalClientException: Cannot build ReportPortal client
at com.epam.reportportal.service.ReportPortal$Builder.build(ReportPortal.java:241)
at com.epam.reportportal.cucumber.AbstractReporter.buildReportPortal(AbstractReporter.java:101)
at com.epam.reportportal.cucumber.AbstractReporter$1.get(AbstractReporter.java:71)
at com.epam.reportportal.cucumber.AbstractReporter$1.get(AbstractReporter.java:64)
at rp.com.google.common.base.Suppliers$MemoizingSupplier.get(Suppliers.java:120)
at com.epam.reportportal.cucumber.ScenarioReporter.afterLaunch(ScenarioReporter.java:116)
at com.epam.reportportal.cucumber.AbstractReporter.close(AbstractReporter.java:365)
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:566)
at cucumber.runtime.Utils$1.call(Utils.java:40)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.Utils.invoke(Utils.java:34)
at cucumber.runtime.RuntimeOptions$1.invoke(RuntimeOptions.java:294)
at com.sun.proxy.$Proxy11.close(Unknown Source)
at cucumber.runtime.junit.JUnitReporter.close(JUnitReporter.java:232)
at KarateReportPortalRunner.run(KarateReportPortalRunner.java:132)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
Caused by: java.net.MalformedURLException: no protocol: yourinstancepleaseedit
at java.base/java.net.URL.(URL.java:627)
at java.base/java.net.URL.(URL.java:523)
at java.base/java.net.URL.(URL.java:470)
at com.epam.reportportal.service.ReportPortal$Builder.defaultClient(ReportPortal.java:274)
at com.epam.reportportal.service.ReportPortal$Builder.build(ReportPortal.java:233)
... 23 more
Could you please suggest what might be the causing the issue, please ?
The project is not compiling when using Karate version 0.9.3.
Have karate tests integration with report portal setup. Trying to show logs in report portal based on logging configuration level [ fatal>error>warn>info>debug>trace ], but it's not working. It is showing INFO level log under DEBUG section. As per my understanding INFO logs should not logged in DEBUG in report portal, but it showing at wrong place.
Hare is snapshot.
D point to DEBUG log and I pointing to INFO log, Why this INFO logs showing under DEBUG ? Log slider in report portal pointing to INFO in snapshot.
I am using following log4j2.xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration packages="com.epam.ta.reportportal.log4j.appender" status="WARN">
<Appenders>
<Console name="ConsoleAppender" target="SYSTEM_OUT">
<PatternLayout
pattern="%d [%t] %-5level %logger{36} - %msg%n%throwable"/>
</Console>
<ReportPortalLog4j2Appender name="ReportPortalAppender">
<PatternLayout
pattern="%d [%t] %-5level %logger{36} - %msg%n%throwable"/>
</ReportPortalLog4j2Appender>
</Appenders>
<Loggers>
<Root level="DEBUG">
<AppenderRef ref="ConsoleAppender"/>
<AppenderRef ref="ReportPortalAppender"/>
</Root>
<Logger name="com.epam.reportportal.service" level="WARN" additivity="false">
<AppenderRef ref="ConsoleAppender"/>
<AppenderRef ref="ReportPortalAppender"/>
</Logger>
<Logger name="com.epam.reportportal.utils" level="WARN" additivity="false">
<AppenderRef ref="ConsoleAppender"/>
<AppenderRef ref="ReportPortalAppender"/>
</Logger>
</Loggers>
</Configuration>
pom.xml
<repositories>
<repository>
<id>bintray</id>
<url>http://dl.bintray.com/epam/reportportal</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.epam.reportportal</groupId>
<artifactId>agent-java-cucumber</artifactId>
<version>5.0.1</version>
</dependency>
<dependency>
<groupId>com.epam.reportportal</groupId>
<artifactId>commons-model</artifactId>
<version>5.2.2</version>
</dependency>
<dependency>
<groupId>com.epam.reportportal</groupId>
<artifactId>client-java</artifactId>
<version>5.0.21</version>
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-gatling</artifactId>
<version>0.9.6</version>
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-apache</artifactId>
<version>0.9.6</version>
</dependency>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-junit5</artifactId>
<version>0.9.6</version>
</dependency>
</dependencies>
I am referring sendLog() methods from https://github.com/workwithprashant/karate-reportportal-demo/blob/develop/src/test/java/com/dell/reporting/reportportal/ScenarioReporter.java
Please suggest any solution for the consolidating logs in report portal as per provided log level.
Thanks,
Shubham
When i tried using the code , it is not pushing any details to report portal. However when i tried in another framework it worked fine. It would be great help if you could share the steps on how to integrate report portal with Karate 1.0.1 .
thanks in advance.
Describe the bug
In a scenario outline with examples, if 1 example passed and another one failed, the report shows 2 failed tests
Steps to Reproduce
Steps to reproduce the behavior:
Run Scenario Outline with at least 2 Examples where one of them fails.
E.g.
Scenario Outline: Verify math
Given def mathResult = < vara > + < varb >
Then assert mathResult == < result >
Examples:
| vara | varb| result |
| 2 | 2 | 4 |
| 1 | 2 | 5 |
Check ReportPortal results
Expected behavior
ReportPortal displays 1 passed test and 1 failed test
Actual behavior
ReportPortal displays 2 failed tests
The passed test is marked as a failed, but without failed steps and without error log inside the steps.
Dependency versions
agent-java-karate 5.0.0
Hey, can we have the integration of the karate V0.9.6 with the report portal?
Describe the bug
A clear and concise description of what the bug is.
When I run a scenario which call another scenario, I got below error:
Cannot invoke "com.epam.reportportal.karate.utils.BlockingConcurrentHashMap$BlockingReference.get(long, java.util.concurrent.TimeUnit)" because the return value of "java.util.Map.remove(Object)" is null
And it runs with no problem after I remove .hook(new ReportPortalHook())
Steps to Reproduce
Steps to reproduce the behavior:
Scenario: delete a team having members
# create a team
* def name = 'team'
* path 'teams'
* request { name: "#(name)", description: "auto test"}
* method post
* status 200
* match response.data contains { id: '#string', name: '#(name)', description: 'auto test' }
* def toDeleteId = response.data.id
* call read('@remove-user-then-delete-team') { toDeleteId: '#(toDeleteId)' }
@ignore @remove-user-then-delete-team
Scenario: remove team users and then delete a team
# get team member
* path 'teams', toDeleteId, 'members'
* method get
* status 200
* def memberId = response.data.data[0].id
# remove member
* path 'teams', toDeleteId, 'members', memberId
* method delete
* status 200
# delete a team
Expected behavior
The test is runned successfully.
Actual behavior
Got an error when running.
Cannot invoke "com.epam.reportportal.karate.utils.BlockingConcurrentHashMap$BlockingReference.get(long, java.util.concurrent.TimeUnit)" because the return value of "java.util.Map.remove(Object)" is null
Dependency versions
agent-java-karate 5.0.4
Additional context
N/A
Hi Report Portal,
I wanted to use the report Portal with Karate tool and the integration that is on GitHub is pretty old with the new version of Karate 1.0.1, but I found custom-written Integration with the new version of Karate and it works well.
In that custom version “Attachments aren’t been sent to Report Portal ” My question here is Can we get support How to send Attachments to Report Portal via Karate Integration?
Custom Code for Karate Integration: https://github.com/kirksl/karate-maven-gradle
I have raised an issue there but wanted here support too If there is a way to send attachments
Describe the bug
When using tags from the command line to run Karate tests, all feature files in the package classpath are reported to the report portal. Karate internally filters out the feature files to run and only runs the filtered features and scenarios, but it seems like the report portal karate agent is not able to do so and reports all feature files in the package.
Steps to Reproduce
Use hook to run the test with tags(), so that karate will pick the tags from command line parameters
Results results = Runner.path("classpath: pathToPackageHavingAllFeatureFiles").hook(new ReportPortalHook()).tags().outputCucumberJson(true).parallel(threadCountValue);
Run test from command line using mvn test command with the tag option like '-Dkarate.options=--tags=@mytag'
Expected behavior
Only tests that karate runs should be reported to ReportPortal.
Actual behavior
All feature files in the classpath package are showing up under the Reportportal launch. The files that are not actually run by Karate are just showing with the status "Run interrupted" and no tests.
Dependency versions
client-java: 5.2.5
agent-java-karate: 5.0.4
karate: 1.4.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.