Skip to content

[RIT] Data Piping - Sending transformed data #148

@cmr6689

Description

@cmr6689

Story

As a TSDetect user who has agreed to send my usage data for research purposes, I want my usage data to be transformed into a usable form and sent to the centralized database.

Requirements

  • The test results generated from the TSDetect plugin shall be scanned for the following sendable information:
    • Timestamp
    • A list of test smells, and associated number of occurrences
  • The sendable information, along with the users uid, shall be compiled into a hashmap with the following format:
    • userID : 0
    • Timestamp in “yyyy-mm-dd hh:mm:ss” format : 0
    • Testsmell Name : Number of that test smell found
      • ^ Above is repeated the required number of times to incorporate all test smells
  • The hashmap of sendable data shall be wrapped in a JSON format
    • Data is sent over HTTP as a JSON object
  • The TSDetect tool shall attempt to connect to the “POST /test-results” endpoint of the TSDetect input API and send this json
    • If the POST request does NOT return a response of 200, TSDetect shall attempt to connect again, to a maximum of five attempts.
      • If the POST request fails to return a response of 200 five consecutive times, TSDetect will store the json as a file locally
    • If the POST request returns a response of 200, TSDetect shall dispose of the data collected
    • If there are any json files located in TSDetect’s designated local storage area, it shall verify that they are of the correct format
      • If they are, TSDetect shall repeat the POST /test-results with this json file.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions