Ask a Question

Listeners

SOLVED
tsuarezc
Occasional Contributor

Listeners

Hi,

To not show password in the JDBC WsdlDataSourceTestStep, I create a TestRunListener, calling beforeRun(...) I am able to set the password, it only works when run a test case.
1. I want to do the same implementation when running the standalone test step, i.e. using a listener for a test step. How can I do it?
2. I want to do some actions when a project is saved but calling the Project listener method beforeSave => does not work

need to know how to configure the listener.xml for ProjectListener interface and some example of groovy script implementation
and also implementation of test step listener

 

thank you

1 ACCEPTED SOLUTION

Accepted Solutions
tsuarezc
Occasional Contributor

Re: Listeners

There is an enhancement for special encryption of DB passwords in the project file (RIA-3363).

View solution in original post

7 REPLIES 7
aaronpliu
Frequent Contributor

Re: Listeners

@tsuarezc 

you may take a look "Events" (Right Click on project, and select Events).

It list out all of available events and provide some sample code. You can select proper event and implement it by yourself

 

 

Thanks,

/Aaron

nmrao
Community Hero

Re: Listeners

Please try SubmitListener.beforeStep.

beforeRun for test case, so is the behaviour.


Regards,
Rao.
tsuarezc
Occasional Contributor

Re: Listeners

I made code for TestRunListener (They are not triggered when you run a separate test step.)

Need to create code for a test step, and also for Project.beforeSave() (ProjectListener)

tsuarezc
Occasional Contributor

Re: Listeners

This only will work for a specific project, I do not want this. I want to create a listener for ReadyAPI (all projects)

nmrao
Community Hero

Re: Listeners

Sorry, but which reply you are talking about?


Regards,
Rao.
tsuarezc
Occasional Contributor

Re: Listeners

I don't want to use the approach "Events", it only works at the project level. I need to create listeners and actions for ReadyAPI that will be used for all users from my team.

1. Decrypt and send the password to the JDBC Datasource steps (I already created a listener for TestRun, but need to create a new one when an isolated test step run).

2. When the user clicks on "Save Project" I need to avoid that the password is saved in plain text, I will save it encrypted. 

ReadyAPI shadows the password in JDB Datasource steps but when you save the project the password is saved in plain text (it is unacceptable for our company)

tsuarezc
Occasional Contributor

Re: Listeners

There is an enhancement for special encryption of DB passwords in the project file (RIA-3363).

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: