-
-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide ability to reload .properties on runtime #6
Comments
@iKozzz we can provide method for completely re-initialize guice app context. Will it work for you? |
Yeah, we can run this method on @BeforeSomething |
@avarabyeu up? |
Added in 3.0. Additional details on making this will be provided in documentation |
Hi everyone! |
@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 |
Way too odd. I was expecting to see something like usecase1 - I'm using ReportPortalTestNGListener and I want too change Launch name prior to test start but after framework initialization. |
@DzmitryHumianiuk I have written below snippet in 'BeforeSuite' for setting launch name in 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. |
@iKozzz can you comment on above as well? |
You can achieve using Environment variables. Its working fine for me |
Create environment variables or pass the value from command line. I am passing it from maven command: |
@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 ? :) |
we came up with custom runner so we can play with properties prior to ReportPortal.listener start |
|
Can anyone of you also look at the issue tagged with RP usage with Selenium Grid. |
@KunalShokeen432 I am using RP with my selenium testng framework. |
Hi @DzmitryHumianiuk , |
@acdurai join our community in slack and ask in #agent_java channel for help |
@DzmitryHumianiuk thank you so much |
I would like to update listener with new properties values before tests are executed.
Basically i need to create
reportportal.properties
according to starting suite and then update ReportPortalTestNGListener (in my case) with new information.Currently this is unable because listener will initialize itself on TestNG framework start.
I know that i can pass environment variables thru command line, but it's not the case for me.
My idea is to keep all configuration inside my framework and require only necessary command line parameters. For example
-Dclient=SomeClientID
is a keyword to setup all the required data for suite.The text was updated successfully, but these errors were encountered: