You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by "nonealexq (via GitHub)" <gi...@apache.org> on 2023/04/28 15:49:06 UTC

[GitHub] [jmeter] nonealexq opened a new issue, #5850: (vault-integration) Use dynamic env in JDBC Connection Configuration

nonealexq opened a new issue, #5850:
URL: https://github.com/apache/jmeter/issues/5850

   ### Expected behavior
   
   Hi!
   I want to write a configurator for vault https://www.vaultproject.io/ to take variables from there and use them in tests inside JMeter
   But there is a problem related to JDBC Connection Configuration
   
   I write my configurator in the form.  
   API GET domain.vault.com/my/secrets/.env --> some properties
   
   And I use this function
   JMeterContextService.getContext().getProperties().put(key, (String) myVaultData.get(key)); 
   
   In the databaseUrl/username/password fields of the JDBC Connection Configuration, I access the variables as ${__P(my_env)}
   
   JDBC Connection Configuration doesn't see my Properties the first time I run Thread Group. But if I repeat Thread Group - it works...
   
   I understand that it runs before any scripts, but I want to be able to get rid of local csv/.env files and make it convenient...
   
   Is it possible to use my properties in JDBC Connection Configuration on the first run?
   <img width="1480" alt="Снимок экрана 2023-04-28 в 20 42 38" src="https://user-images.githubusercontent.com/30975418/235194121-dd56ba9e-d4f5-43da-a69b-97c9f3ae6574.png">
   <img width="1480" alt="Снимок экрана 2023-04-28 в 20 42 47" src="https://user-images.githubusercontent.com/30975418/235194131-bd81d6a1-36d7-40ca-8ee4-6e4b685d81a2.png">
   
   
   ### Actual behavior
   
   _No response_
   
   ### Steps to reproduce the problem
   
   1. Start jmeter
   2. Put properties
   3. Use properties in jdbc configuration filed (url/username/password)
   4. run
   
   ### JMeter Version
   
   5.4.3
   
   ### Java Version
   
   _No response_
   
   ### OS Version
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jmeter] nonealexq commented on issue #5850: (vault-integration) Use dynamic env in JDBC Connection Configuration

Posted by "nonealexq (via GitHub)" <gi...@apache.org>.
nonealexq commented on issue #5850:
URL: https://github.com/apache/jmeter/issues/5850#issuecomment-1528154320

   Just use testStarted()
   https://github.com/apache/jmeter/blob/rel/v5.4.1/src/protocol/jdbc/src/main/java/org/apache/jmeter/protocol/jdbc/config/DataSourceElement.java#L112 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jmeter] nonealexq closed issue #5850: (vault-integration) Use dynamic env in JDBC Connection Configuration

Posted by "nonealexq (via GitHub)" <gi...@apache.org>.
nonealexq closed issue #5850: (vault-integration) Use dynamic env in JDBC Connection Configuration 
URL: https://github.com/apache/jmeter/issues/5850


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org