Skip to content

Latest commit

 

History

History
95 lines (57 loc) · 3.42 KB

recording.md

File metadata and controls

95 lines (57 loc) · 3.42 KB

If you want to record both db and http interactions just follow both the paths before starting recording

ALL RECORDINGS CAN BE CHANGED AND EDITED!

Web Recording

An example

Setup Local standalone

This approach require that you can change the rest api addresses called by your application

  • Change on your application the servers to the corresponding Whens

Setup With DNS Hijacking - Known hosts

If you are running the application into a container (and therefore uses ) or wants to record the interactions from a phone, but you know the hosts

  • Add the DNS on the dns Mappings
  • Add the names on the SSL Websites section

Setup With DNS Hijacking - Unknown hosts

One possibility (for http only) is to set the proxy module interceptAllHttp to true And start the application to monitor with an http proxy. Following this approach all http calls will be logged even the ones to plain IP addresses.

If you are running the application into a container (and therefore uses ) or wants to record the interactions from a phone, and you have no idea of the hosts called

Setup the clients

  • If recording phones, setup the phone to connect to the HAM vpn or with the Http/Https/Socks proxyes and install the SSL certificate on the phone
  • You can connect to the VPN on the container -if it runs on a different machine-
  • Connect via Browser proxy if you can handle it with an UI
  • Configure the proxy for your curl calls if you wanna go through command line

Capture the DNSs

  • Run then your tests that will contact the real servers
  • You can find on the DNS section the list of resolved addresses

  • Select all the addresses you are interested
  • Generate SSL Mappings
  • Generate DNS Mappings

Run!

Then you can create a new recording and start recording!

Db Recording

  • Instruct you application to use JanusJdbc and add the relevant proxies here
  • Check the record DB calls
  • Choose if you want to Record void db calls: Void methods are completely mocked. If you want you can ask ham to record them too (for inspection reasons)

Please note that if you start the application -before- starting the recording, you will need the real database when doing the test. If you instead start the recording -before- the application under test you will record even all the initialisations and you will not need ANY DATABASE AT ALL

Mongo Recording

  • Just create a Mongo proxy here
  • Use the standard mongo connection string as suggested in the proxy functionality

Simpler recording

You can choose to simulate the "non data" related calls it's enough to check the flag during recording (AND REPLAYING)

Create recording

Editing data

You can edit the resultsets adding/removing columns! The engine will handle the datatypes conversions for you

Create recording

Notes:

The replayer and recorder filters has a priority of 200