New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

controlup-challenge

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

controlup-challenge

This project is an automation framework built in Node.js for querying the TripAdvisor API and retrieving information about cruises with a focus on the destination "Caribbean". The framework fetches cruise data from the API and sorts it by the number of

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
0
Weekly downloads
 
Created
Source

ControlUp Backend Automation Framework

This project is an automation framework built in Node.js for querying the TripAdvisor API and retrieving information about cruises with a focus on the destination "Caribbean". The framework fetches cruise data from the API and sorts it by the number of crew members. The project includes testing functionality and follows best practices like DRY (Don't Repeat Yourself), environment-based configurations, and includes a GitHub Actions CI/CD pipeline.

Supported Environments

Production | Staging | Development | Test

Setup Instructions

Local Setup

  1. Clone the repository.
git clone https://github.com/geiserman/controlup-challenge.git
cd controlup-challenge
  1. Install dependencies:
npm install
  1. Set up environment configurations:
The configuration files for various environments are located in /config. 
You can modify configuration for each environment (production, staging, development, test).

Running Tests

Note: Before running the tests, make sure to set the environment variables for the desired environment.
Example: NODE_ENV=production

Running Tests Locally

  1. Run tests individually: You can run a specific test file by executing the file directly
  2. Run the complete test suite: Execute the npm run test command in the terminal to run the complete test suite. This will trigger the run-test-with-retries.js script, which adds retry logic for any flaky tests.
npm run test

Running Tests via GitHub Actions

You can also run the tests via GitHub Actions:

  • Go to your project's GitHub page.
  • Navigate to the Actions tab.
  • Select the manual trigger workflow.
  • From the "Run workflow" dropdown, select:
    • Script to be executed (based on the package.json scripts).
    • Node.js version.
    • Branch where the test will be executed.
  • The test results will be available as artifacts under the "Manual Trigger" workflow tab once the workflow completes.
## Technologies Used
- Node.js: Backend runtime.
- Jest: Testing framework.
- Superagent: RESTful client with retry and error handling capabilities.
- GitHub Actions: CI/CD for automating tests.
- YAML: Used for configuration management.
- Custom Packages: Logger, RESTful client, Configuration parser

Project Structure

/.github                    # GitHub Actions CI/CD workflow files
/config                     # Contains environment-specific configuration files (YAML)
/src                        # Core business logic and services
/tests                      # Unit and integration tests
/logs                       # Application log files
/reports                    # Test reports xml and html
package.json                # Project metadata and scripts
jest.config.js              # Jest test configuration
run-test-with-retries.js    # Retry mechanism script for tests

FAQs

Package last updated on 13 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc