Skip to content

Create Slack Data Fetching Script for Test Data Generation #267

@devin-ai-integration

Description

@devin-ai-integration

title: "Create Slack Data Fetching Script for Test Data Generation"
labels: enhancement, testing
assignees: ""

Overview

Develop a script that fetches real data from the Slack API using provided credentials and generates test data files for use by the mock Slack API service.

Background & Purpose

To ensure that our mock Slack API service accurately represents real-world data, we need a way to generate test data that matches the structure and content of actual Slack data. This script will allow developers to generate fresh test data using their own Slack credentials, ensuring the mock service remains accurate as the Slack API evolves.

Implementation Details

  1. Create a Node.js script in integration-tests/utils/slack-data-fetcher.js
  2. Implement functions to fetch:
    • Channel list
    • Messages from selected channels
    • User information for message authors
    • OAuth response structure
  3. Save fetched data as JSON files in integration-tests/mocks/slack-api/data/
  4. Add error handling and logging
  5. Ensure the script can be run from the command line with appropriate options

Related Documentation

Related Issues

Completion Criteria

  • Script can be run with a Slack API token to generate test data
  • Generated data is saved in the correct format and location for use by the mock service
  • Script handles errors gracefully and provides clear feedback
  • Documentation is provided on how to use the script

Additional Notes

The script should be designed to fetch a reasonable amount of data (not too much to be unwieldy, but enough to be representative). It should also anonymize or sanitize sensitive information while preserving the data structure needed for testing.

Metadata

Metadata

Assignees

No one assigned

    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