Understanding the CSV Input file

Overview

The program uses a .CSV input file for it's tests. Each line of the csv file represents a call to the service. In each of the lines, the method call name and parameters must be specified. Refer to the example below and how to setup your call.

Syntax

  • The call must include the method name first and then parameters. The method name is CaSe SeNsItIvE
  • Each call must be set on one single line
  • Each parameter is wrapped in "double quotes"
  • If the parameter is an object, the curly brace must be used to declare an anonymous object
  • Inside an object, the property can be set by using the syntax name: value;
  • If the parameter is of type IEnumerable (or derived of) or Array, the square brace must be used. Each member is than separated by a comma.

SOAP CALLS

Overview

The soap calls must have the method name as the first paramater and method parameter has subsequent parameters.

Example

For instance, if we have a service that has the following method signature:

public bool AddUser(string username, string email, PersonalInfo info);

class PersonalInfo
{
public string Name {get; set;}
public Address Address {get; set;
}

class Address
{
public string City {get; set;}
public string AdressLine1 {get; set;}
public string AddressLine2{get;set;}
public string PostCode {get; set;}
}

PS: Notice that the parameter personalInfo is an object and I've specified the class above for the sake of this example.

A valid call markup specified in the CSV file would be the following:

"AddUser","user1","user1@email.com","{Name: Joe Bloe; Address: {City: New-York; AddressLine1: 123 Main street; PostCode: 123456;}}"

This is also correct

"AddUser","user1","user1@email.com","null"

Complex nested example

We have the following method signature:

public string GetData(IEnumerable<CompositeType> values);

public class CompositeType
{
public CompositeType[] Values { get; set; }

public CompositeType Value { get; set; }

public string Number { get; set; }
}

Here's a series of valid complex calls that would be correct: (I had to upload an image because the CSV file formating interferes with the Wiki Markup)

example.png
  • Warning: Do not enter spaces between your comma and double quotes!
  • Warning: There's no "escape" sequence supported yet. Thus, the following program characters cannot be entered in your data :
    • Square braces
    • Curly braces
    • Double dots
    • Commas
    • Semi-colons

REST Calls

Overview

For REST execution, instead of the method name as the first parameter, the call type must be written. The following call types are supported:
  • HEAD
  • GET
  • POST
  • DELETE

The second parameter is the relative URL for example:

"GET","/users/"

The third parameter is an object to be passed for POST requests for instance. The object syntax is the same as above. A complete post example could look as follows:

"POST","/users/","{FirstName:John;LastName:Doe;}"

Last edited Jul 2, 2014 at 5:28 PM by Gonfire, version 13