cancel
Showing results for 
Search instead for 
Did you mean: 

Connect to Redis to flush cash

SOLVED
Highlighted
Occasional Contributor

Connect to Redis to flush cash

I am trying to find a way to connect to Redis and flush the cache.

Do somebody know how to do it ?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Leader

Re: Connect to Redis to flush cash

@fmensah :

 

Have you able to connect to Redis successfully?

If Yes then you can follow from step 2

if Not then you can follow from Step 1

 

1. Place the Redis jar(download from here) file under bin/ext folder of soapUI, then restart soapui

 

2. Write the below groovy script Code:

import redis.clients.jedis.Jedis

Jedis jedis = new Jedis("Host")
jedis.connect()
jedis.flushDB()

 

3. Run the script

 

Hope it will resolve your issue


Click "Accept as Solution" if my answer has helped, and remember to give "kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal

View solution in original post

2 REPLIES 2
Highlighted
Community Leader

Re: Connect to Redis to flush cash

@fmensah :

 

Have you able to connect to Redis successfully?

If Yes then you can follow from step 2

if Not then you can follow from Step 1

 

1. Place the Redis jar(download from here) file under bin/ext folder of soapUI, then restart soapui

 

2. Write the below groovy script Code:

import redis.clients.jedis.Jedis

Jedis jedis = new Jedis("Host")
jedis.connect()
jedis.flushDB()

 

3. Run the script

 

Hope it will resolve your issue


Click "Accept as Solution" if my answer has helped, and remember to give "kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal

View solution in original post

Highlighted
Occasional Contributor

Re: Connect to Redis to flush cash

I want to connect to Redis using the host, port, password and ssl connection.

host=host,
port=6380,
password=password,
ssl=True,
 
Do you know how to convert it into a Groovy script ?
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to change request body before sending it to the server for the TechCorner tag!


Scripts created in June:
- A script to generate a request body based on data from Datasource
- A script to go through all response nodes and check the value of the required field
- A Dispatching script to get responses based on the values in Request Body
- A script to add a new tag and assign it to all TestCases in a TestSuite
Top Kudoed Authors