Skip to content

Task2.0 ObjectMapping & Serialization

costea32 edited this page Feb 4, 2014 · 1 revision

Definition:

Create a UI test project that will use CodedUI or Selenium. It will have a test method that will do the following actions:

  1. Go to AutomationTraining home page on gitHub
  2. Navigate to Branches
  3. For each branch
    1. Click on branch name
    2. Scan through all folders and create a List of all files and folders
  4. Write the whole information related to branches and files within to a file.

Writing to a file should be done in two ways - JSON and XML

Writing the data

You are expected to write the data to look like this (for JSON) [{"BranchName":"Task1-Implementations", "Behind":2, "Ahead":3, "Source":[{"Name":"Task1","Type":"Folder","Comment":"task1 created", "LastUpdated":"6 hours ago", "Children":[{"Name":"Task1.sln","Type":"File","Comment":"task1 created", "LastUpdated":"6 hours ago", "Children":[]},....]},{"Name":".gitattributes", "Type":"File", "Comment":"task1 created", "LastUpdated":"6 hours ago"}]}, {"BranchName":"another branch.......]

Recommended technologies

  • C# Generics
  • WCF for serializing (can be used)
  • Strategy pattern for serialization types
  • Inheritance

Acceptance criteria

  • Test method does the things it has to do
  • Code is clean, meaningful names
  • Use DRY principle, and be ready to explain why there is duplicate code, if there is any
Clone this wiki locally