mesmer data

Retrieve project test data.

Why test data is useful

Test data informs the logic behind application crawls and test execution. When test data is present in a project, crawls and test assertions can make use of:

  • Login credentials
  • Credit card information, in checkout flows
  • Search keywords and queries
  • Virtualized device locations
  • Custom key-value data

Mesmer will use test data to inform application crawls wherever it's relevant---for instance, entering login credentials whenever it sees a login form, or entering a search keyword whenever it detects a search box as part of the UI. Additionally, you can use the test data to define assertions when recording a test case.

mesmer data describe

Fetch a project's test data.

# Update test data from test_data.yml
$ mesmer data describe
Data ID                  Namespace  Type         Group Name           Data
5fb524e77fd8f10a597911bf Project    Custom       [no group]           Custom1604305219559:abc@gmail.com
5fb524e77fd8f10a597911c0 Project    Custom       [no group]           searchLocation:location
5fb524e77fd8f10a597911c1 Project    GPS          coordinates1         latitude:41.8755616  longitude:-87.6244212
5fd337b070f774000fdf1871 Project    Login        test                 username:test••••••••••  password:••••••••
5fd33eb3d02c71c336cb5c33 Project    Login        login1               username:test  password:example
5fb524e77fd8f10a597911c2 Project    Search Term  [no group]           search1:video

To include test-case level test data, use the --test argument, and pass in a test ID:

# Get the first test ID
$ test_id="$(mesmer -q '.[0]._id' test list)"

# List test data for that test
$ mesmer data describe --test $test_id
Data ID                  Namespace  Type         Group Name           Data
5fb524e77fd8f10a597911c3 Test Case  Address      address1             first_name:adfs  last_name:sdf  address_line1:asfsf223  address_line2:a23324  city:assr23  state:asdf  zipcode:234324  country:aadf
6040400df61815000f56d7d9 Test Case  Address      testaddr             Firstname:asdf  Lastname:asdf  Addressline1:asdf  Addressline2:asdf  City:asdf  State:asdf  Zipcode:asdf  Country:asdf
60403d26f61815000f56d7c8 Project    Credit Card  fakeCC               Cardnumber:1234123412341234  Expiry:exp  CVV:123  Firstname:Fakefirstname  lastsnameEditedIdent:Fakelastname
60404048f61815000f56d7e2 Test Case  GPS          coord1               Latitude:123  Longitude:456
5fb524e77fd8f10a597911c1 Project    GPS          coordinates1         latitude:41.8755616  longitude:-87.6244212
60403fedf61815000f56d7d8 Test Case  Login        testlogin2           Username:someusername  Password:somepassword
5fd33eb3d02c71c336cb5c33 Project    Login        login1               username:test  password:mesmer
5fb524e77fd8f10a597911c2 Project    Search Term  [no group]           search1:video