Comments (19)
@Lalesia properties are being loaded from here: PropertiesLoader
If i'd like to override properties you can use jvm\env vars or replace\override it on the code level in Configuration Module
Example of extending TestNG Listener can be found here
from reportportal.
Way too odd. I was expecting to see something like
PropertiesLoader.add("my_custom_parts.properties");
or
PropertiesLoader.reload();
usecase1 - I'm using ReportPortalTestNGListener and I want too change Launch name prior to test start but after framework initialization.
usecase2 - I'm using ReportPortalTestNGListener and I want too add more tags after framework initialization
from reportportal.
@mohdsgithub Great thanks it works for me too. As it seems, it will override the values present in reportportal.properties if provided via command line ? :)
awesome!!
Also I stored 'rp.enable' parameter value passed from command line. This will enable us to decide whether to send screen shot attachment to RP or not in case of test failure
from reportportal.
@iKozzz we can provide method for completely re-initialize guice app context. Will it work for you?
from reportportal.
Yeah, we can run this method on @BeforeSomething
from reportportal.
@avarabyeu up?
from reportportal.
Added in 3.0. Additional details on making this will be provided in documentation
from reportportal.
Hi everyone!
Where I can find in documetation this approach?
I really need it right now for project with a lot of modules and projects, so it would be great to change property file in runtime. Thanks
from reportportal.
@DzmitryHumianiuk I have written below snippet in 'BeforeSuite' for setting launch name in reportporttal.properties
.
PropertiesConfiguration conf = new PropertiesConfiguration("src/main/resources/reportportal.properties");
conf.setProperty("rp.launch", "Kunal");
conf.save();
It is set successfully but after Reportportal listener is initialized in suite.xml file.
Is there a way to set it prior Reportportal listener initialization ?
from reportportal.
@iKozzz can you comment on above as well?
from reportportal.
You can achieve using Environment variables. Its working fine for me
from reportportal.
@DzmitryHumianiuk I have written below snippet in 'BeforeSuite' for setting launch name in reportporttal.properties.
PropertiesConfiguration conf = new PropertiesConfiguration("src/main/resources/reportportal.properties");
conf.setProperty("rp.launch", "Kunal");
conf.save();
It is set successfully but after Reportportal listener is initialized in suite.xml file.
Is there a way to set it prior Reportportal listener initialization ?
Create environment variables or pass the value from command line. I am passing it from maven command:
mvn -U -fn -Dsurefire.suiteXmlFiles=D:\testng\webdriver\singleTest.xml -Drp.launch=MOH -Drp.enable=true clean test
from reportportal.
@mohdsgithub Great thanks it works for me too. As it seems, it will override the values present in reportportal.properties if provided via command line ? :)
from reportportal.
we came up with custom runner so we can play with properties prior to ReportPortal.listener start
from reportportal.
Can anyone of you also look at the issue tagged with RP usage with Selenium Grid.
from reportportal.
@KunalShokeen432 I am using RP with my selenium testng framework.
What exactly r u looking for
from reportportal.
Hi @DzmitryHumianiuk ,
I'm using selenium with JUNIT 4.12 framework, I would like to update the reportportal.properties file before the Reportportal listener is getting initialized .
Please help me on this
from reportportal.
@acdurai join our community in slack
https://reportportal-slack-auto.herokuapp.com/
and ask in #agent_java channel for help
from reportportal.
@DzmitryHumianiuk thank you so much
from reportportal.
Related Issues (20)
- SAML configure HOT 18
- Performance with robotframework-reportportal 6-10 times slower than without HOT 6
- Reportportal and Podman HOT 1
- v23.2 Migration of Legacy UUID Auth Tokens not working HOT 2
- enable Item filtering for Unique Errors table HOT 1
- API - Cluster ID missing from the TestItem details HOT 1
- enable Unique Errors table sorting by cluster size HOT 1
- Not able to Create Notification Rule HOT 2
- Not Receiving Email of report after adding Notification rule HOT 35
- "Launch 'xxx' not found. Did you use correct Launch ID?" HOT 1
- Issue about the article "Issues with JIRA bug tracking system: how to resolve" HOT 3
- Jira issue status is not updated HOT 1
- Azure SAML callbackURI doesn't support custom TLD. HOT 1
- Service-api container alone going unhealthy state frequently HOT 1
- Reqnroll agent dotnet HOT 5
- test run not showing under launch section when deployed RP in Ubundu AWS server HOT 9
- Skipped scenarios are automatically changed to failed HOT 3
- Comparing two launches. Show new failures HOT 2
- link type of a failure to testName HOT 3
- Webhook support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reportportal.