Alternatives to SuperTest logo

Alternatives to SuperTest

Chai, jsdom, Jest, axios, and Postman are the most popular alternatives and competitors to SuperTest.
931
0

What is SuperTest and what are its top alternatives?

It is a super-agent driven library for testing node.js HTTP servers using a fluent API. It provides a high-level abstraction for testing HTTP, while still allowing you to drop down to the lower-level API provided by superagent.
SuperTest is a tool in the Javascript Testing Framework category of a tech stack.
SuperTest is an open source tool with GitHub stars and GitHub forks. Here’s a link to SuperTest's open source repository on GitHub

Top Alternatives to SuperTest

  • Chai
    Chai

    It is a BDD / TDD assertion library for node and the browser that can be delightfully paired with any javascript testing framework. It has several interfaces that allow the developer to choose the most comfortable. The chain-capable BDD styles provide an expressive language & readable style, while the TDD assert style provides a more classical feel. ...

  • jsdom
    jsdom

    It is a pure-JavaScript implementation of many web standards, notably the WHATWG DOM and HTML Standards, for use with Node.js. In general, the goal of the project is to emulate enough of a subset of a web browser to be useful for testing and scraping real-world web applications. ...

  • Jest
    Jest

    Jest provides you with multiple layers on top of Jasmine.

  • axios
    axios

    It is a Javascript library used to make http requests from node.js or XMLHttpRequests from the browser and it supports the Promise API that is native to JS ES6. ...

  • Postman
    Postman

    It is the only complete API development environment, used by nearly five million developers and more than 100,000 companies worldwide. ...

  • Mocha
    Mocha

    Mocha is a feature-rich JavaScript test framework running on node.js and the browser, making asynchronous testing simple and fun. Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases. ...

  • Cypress
    Cypress

    Cypress is a front end automated testing application created for the modern web. Cypress is built on a new architecture and runs in the same run-loop as the application being tested. As a result Cypress provides better, faster, and more reliable testing for anything that runs in a browser. Cypress works on any front-end framework or website. ...

  • Git
    Git

    Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. ...

SuperTest alternatives & related posts

Chai logo

Chai

3.9K
196
0
A BDD / TDD assertion library
3.9K
196
+ 1
0
PROS OF CHAI
    Be the first to leave a pro
    CONS OF CHAI
      Be the first to leave a con

      related Chai posts

      Anurag Maurya

      Needs advice on code coverage tool in Node.js/ExpressJS with External API Testing Framework

      Hello community,

      I have a web application with the backend developed using Node.js and Express.js. The backend server is in one directory, and I have a separate API testing framework, made using SuperTest, Mocha, and Chai, in another directory. The testing framework pings the API, retrieves responses, and performs validations.

      I'm currently looking for a code coverage tool that can accurately measure the code coverage of my backend code when triggered by the API testing framework. I've tried using Istanbul and NYC with instrumented code, but the results are not as expected.

      Could you please recommend a reliable code coverage tool or suggest an approach to effectively measure the code coverage of my Node.js/Express.js backend code in this setup?

      See more
      Joshua Dean Küpper
      CEO at Scrayos UG (haftungsbeschränkt) · | 7 upvotes · 620.8K views

      For our internal team and collaboration panel we use Nuxt.js (with TypeScript that is transpiled into ES6), Webpack and npm. We enjoy the opinionated nature of Nuxt.js over vanilla Vue.js, as we would end up using all of the components Nuxt.js incorporates anyways and we can adhere to the conventions setup by the Nuxt.js project, which allows us to get better support in case we run into any dead ends. Webpack allows us to create reproducable builds and also debug our application with hot reloads, which greately increased the pace at which we are able to perform and test changes. We also incorporated a lot of testing (ESLint, Chai, Jasmine, Nightwatchjs) into our pipelines and can trigger those jobs through GitLab CI. All packages are fetched through npm, so that we can keep our git repositories slim and are notified of new updates aswell as reported security flaws.

      See more
      jsdom logo

      jsdom

      1.1K
      55
      1
      A JavaScript implementation of the WHATWG DOM and HTML standards, for use with node.js
      1.1K
      55
      + 1
      1
      PROS OF JSDOM
      • 1
        Lightweight
      CONS OF JSDOM
        Be the first to leave a con

        related jsdom posts

        Jest logo

        Jest

        9.7K
        4K
        175
        Painless JavaScript Unit Testing
        9.7K
        4K
        + 1
        175
        PROS OF JEST
        • 36
          Open source
        • 32
          Mock by default makes testing much simpler
        • 23
          Testing React Native Apps
        • 20
          Parallel test running
        • 16
          Fast
        • 13
          Bundled with JSDOM to enable DOM testing
        • 8
          Mock by default screws up your classes, breaking tests
        • 7
          Out of the box code coverage
        • 7
          Promise support
        • 6
          One stop shop for unit testing
        • 3
          Great documentation
        • 2
          Assert Library Included
        • 1
          Built in watch option with interactive filtering menu
        • 1
          Preset support
        • 0
          Can be used for BDD
        • 0
          Karma
        CONS OF JEST
        • 4
          Documentation
        • 4
          Ambiguous configuration
        • 3
          Difficult
        • 2
          Many bugs still not fixed months/years after reporting
        • 2
          Multiple error messages for same error
        • 2
          Difficult to run single test/describe/file
        • 2
          Ambiguous
        • 2
          Bugged
        • 1
          BeforeAll timing out makes all passing tests fail
        • 1
          Slow
        • 1
          Reporter is too general
        • 1
          Unstable
        • 1
          Bad docs
        • 1
          Still does't support .mjs files natively
        • 1
          Can't fail beforeAll to abort tests
        • 0
          Interaction with watch mode on terminal

        related Jest posts

        Simon Reymann
        Senior Fullstack Developer at QUANTUSflow Software GmbH · | 24 upvotes · 4.9M views

        Our whole Vue.js frontend stack (incl. SSR) consists of the following tools:

        • Nuxt.js consisting of Vue CLI, Vue Router, vuex, Webpack and Sass (Bundler for HTML5, CSS 3), Babel (Transpiler for JavaScript),
        • Vue Styleguidist as our style guide and pool of developed Vue.js components
        • Vuetify as Material Component Framework (for fast app development)
        • TypeScript as programming language
        • Apollo / GraphQL (incl. GraphiQL) for data access layer (https://apollo.vuejs.org/)
        • ESLint, TSLint and Prettier for coding style and code analyzes
        • Jest as testing framework
        • Google Fonts and Font Awesome for typography and icon toolkit
        • NativeScript-Vue for mobile development

        The main reason we have chosen Vue.js over React and AngularJS is related to the following artifacts:

        • Empowered HTML. Vue.js has many similar approaches with Angular. This helps to optimize HTML blocks handling with the use of different components.
        • Detailed documentation. Vue.js has very good documentation which can fasten learning curve for developers.
        • Adaptability. It provides a rapid switching period from other frameworks. It has similarities with Angular and React in terms of design and architecture.
        • Awesome integration. Vue.js can be used for both building single-page applications and more difficult web interfaces of apps. Smaller interactive parts can be easily integrated into the existing infrastructure with no negative effect on the entire system.
        • Large scaling. Vue.js can help to develop pretty large reusable templates.
        • Tiny size. Vue.js weights around 20KB keeping its speed and flexibility. It allows reaching much better performance in comparison to other frameworks.
        See more

        I'm working as one of the engineering leads in RunaHR. As our platform is a Saas, we thought It'd be good to have an API (We chose Ruby and Rails for this) and a SPA (built with React and Redux ) connected. We started the SPA with Create React App since It's pretty easy to start.

        We use Jest as the testing framework and react-testing-library to test React components. In Rails we make tests using RSpec.

        Our main database is PostgreSQL, but we also use MongoDB to store some type of data. We started to use Redis  for cache and other time sensitive operations.

        We have a couple of extra projects: One is an Employee app built with React Native and the other is an internal back office dashboard built with Next.js for the client and Python in the backend side.

        Since we have different frontend apps we have found useful to have Bit to document visual components and utils in JavaScript.

        See more
        axios logo

        axios

        3.3K
        414
        0
        Promise based HTTP client for the browser and node.js
        3.3K
        414
        + 1
        0
        PROS OF AXIOS
          Be the first to leave a pro
          CONS OF AXIOS
            Be the first to leave a con

            related axios posts

            I built a project using Quasar Framework with Vue.js, vuex and axios on the frontend and Go, Gin Gonic and PostgreSQL on the backend. Deployment was realized using Docker and Docker Compose. Now I can build the desktop and the mobile app using a single code base on the frontend. UI responsiveness and performance of this stack is amazing.

            See more
            Shared insights
            on
            Vue RouterVue Routeraxiosaxios

            hello, I'm a newbie. is axios the same as Vue Router? Or can /should use both? thanks

            See more
            Postman logo

            Postman

            94.4K
            80.9K
            1.8K
            Only complete API development environment
            94.4K
            80.9K
            + 1
            1.8K
            PROS OF POSTMAN
            • 490
              Easy to use
            • 369
              Great tool
            • 276
              Makes developing rest api's easy peasy
            • 156
              Easy setup, looks good
            • 144
              The best api workflow out there
            • 53
              It's the best
            • 53
              History feature
            • 44
              Adds real value to my workflow
            • 43
              Great interface that magically predicts your needs
            • 35
              The best in class app
            • 12
              Can save and share script
            • 10
              Fully featured without looking cluttered
            • 8
              Collections
            • 8
              Option to run scrips
            • 8
              Global/Environment Variables
            • 7
              Shareable Collections
            • 7
              Dead simple and useful. Excellent
            • 7
              Dark theme easy on the eyes
            • 6
              Awesome customer support
            • 6
              Great integration with newman
            • 5
              Documentation
            • 5
              Simple
            • 5
              The test script is useful
            • 4
              Saves responses
            • 4
              This has simplified my testing significantly
            • 4
              Makes testing API's as easy as 1,2,3
            • 4
              Easy as pie
            • 3
              API-network
            • 3
              I'd recommend it to everyone who works with apis
            • 3
              Mocking API calls with predefined response
            • 2
              Now supports GraphQL
            • 2
              Postman Runner CI Integration
            • 2
              Easy to setup, test and provides test storage
            • 2
              Continuous integration using newman
            • 2
              Pre-request Script and Test attributes are invaluable
            • 2
              Runner
            • 2
              Graph
            • 1
              <a href="http://fixbit.com/">useful tool</a>
            CONS OF POSTMAN
            • 10
              Stores credentials in HTTP
            • 9
              Bloated features and UI
            • 8
              Cumbersome to switch authentication tokens
            • 7
              Poor GraphQL support
            • 5
              Expensive
            • 3
              Not free after 5 users
            • 3
              Can't prompt for per-request variables
            • 1
              Import swagger
            • 1
              Support websocket
            • 1
              Import curl

            related Postman posts

            Noah Zoschke
            Engineering Manager at Segment · | 30 upvotes · 2.9M views

            We just launched the Segment Config API (try it out for yourself here) — a set of public REST APIs that enable you to manage your Segment configuration. A public API is only as good as its #documentation. For the API reference doc we are using Postman.

            Postman is an “API development environment”. You download the desktop app, and build API requests by URL and payload. Over time you can build up a set of requests and organize them into a “Postman Collection”. You can generalize a collection with “collection variables”. This allows you to parameterize things like username, password and workspace_name so a user can fill their own values in before making an API call. This makes it possible to use Postman for one-off API tasks instead of writing code.

            Then you can add Markdown content to the entire collection, a folder of related methods, and/or every API method to explain how the APIs work. You can publish a collection and easily share it with a URL.

            This turns Postman from a personal #API utility to full-blown public interactive API documentation. The result is a great looking web page with all the API calls, docs and sample requests and responses in one place. Check out the results here.

            Postman’s powers don’t end here. You can automate Postman with “test scripts” and have it periodically run a collection scripts as “monitors”. We now have #QA around all the APIs in public docs to make sure they are always correct

            Along the way we tried other techniques for documenting APIs like ReadMe.io or Swagger UI. These required a lot of effort to customize.

            Writing and maintaining a Postman collection takes some work, but the resulting documentation site, interactivity and API testing tools are well worth it.

            See more
            Simon Reymann
            Senior Fullstack Developer at QUANTUSflow Software GmbH · | 27 upvotes · 5.1M views

            Our whole Node.js backend stack consists of the following tools:

            • Lerna as a tool for multi package and multi repository management
            • npm as package manager
            • NestJS as Node.js framework
            • TypeScript as programming language
            • ExpressJS as web server
            • Swagger UI for visualizing and interacting with the API’s resources
            • Postman as a tool for API development
            • TypeORM as object relational mapping layer
            • JSON Web Token for access token management

            The main reason we have chosen Node.js over PHP is related to the following artifacts:

            • Made for the web and widely in use: Node.js is a software platform for developing server-side network services. Well-known projects that rely on Node.js include the blogging software Ghost, the project management tool Trello and the operating system WebOS. Node.js requires the JavaScript runtime environment V8, which was specially developed by Google for the popular Chrome browser. This guarantees a very resource-saving architecture, which qualifies Node.js especially for the operation of a web server. Ryan Dahl, the developer of Node.js, released the first stable version on May 27, 2009. He developed Node.js out of dissatisfaction with the possibilities that JavaScript offered at the time. The basic functionality of Node.js has been mapped with JavaScript since the first version, which can be expanded with a large number of different modules. The current package managers (npm or Yarn) for Node.js know more than 1,000,000 of these modules.
            • Fast server-side solutions: Node.js adopts the JavaScript "event-loop" to create non-blocking I/O applications that conveniently serve simultaneous events. With the standard available asynchronous processing within JavaScript/TypeScript, highly scalable, server-side solutions can be realized. The efficient use of the CPU and the RAM is maximized and more simultaneous requests can be processed than with conventional multi-thread servers.
            • A language along the entire stack: Widely used frameworks such as React or AngularJS or Vue.js, which we prefer, are written in JavaScript/TypeScript. If Node.js is now used on the server side, you can use all the advantages of a uniform script language throughout the entire application development. The same language in the back- and frontend simplifies the maintenance of the application and also the coordination within the development team.
            • Flexibility: Node.js sets very few strict dependencies, rules and guidelines and thus grants a high degree of flexibility in application development. There are no strict conventions so that the appropriate architecture, design structures, modules and features can be freely selected for the development.
            See more
            Mocha logo

            Mocha

            8.7K
            2.9K
            430
            Simple, flexible, fun javascript test framework for node.js & the browser
            8.7K
            2.9K
            + 1
            430
            PROS OF MOCHA
            • 137
              Open source
            • 102
              Simple
            • 81
              Promise support
            • 48
              Flexible
            • 29
              Easy to add support for Generators
            • 12
              For browser and server testing
            • 7
              Curstom assertion libraries
            • 5
              Works with Karma
            • 3
              No other better tools
            • 1
              Simple setup
            • 1
              Works with saucelabs
            • 1
              Lots of tutorials and help online
            • 1
              Default reporter is nice, clean, and itemized
            • 1
              Works with BrowserStack
            • 1
              Simple integration testing
            CONS OF MOCHA
            • 3
              Cannot test a promisified functions without assertion
            • 2
              No assertion count in results
            • 1
              Not as many reporter options as Jest

            related Mocha posts

            Anurag Maurya

            Needs advice on code coverage tool in Node.js/ExpressJS with External API Testing Framework

            Hello community,

            I have a web application with the backend developed using Node.js and Express.js. The backend server is in one directory, and I have a separate API testing framework, made using SuperTest, Mocha, and Chai, in another directory. The testing framework pings the API, retrieves responses, and performs validations.

            I'm currently looking for a code coverage tool that can accurately measure the code coverage of my backend code when triggered by the API testing framework. I've tried using Istanbul and NYC with instrumented code, but the results are not as expected.

            Could you please recommend a reliable code coverage tool or suggest an approach to effectively measure the code coverage of my Node.js/Express.js backend code in this setup?

            See more

            I use both mocha and Jest because:

            • I don't care whether teams use Jest or Mocha. But jest is way too overhyped. Most devs are writing integration tests and think that it's so much better but frankly I don't write integration tests as the way to get both design feedback and confidence when I code. I adhere to the test pyramid, not ice cream cone or the dumb "trophy"

            • I TDD, so I only ever use the "API" of test frameworks. I don't do a lot of integration tests for TDD and all the bells and whistles Jest provides you from the command-line I just don't need. And I certainly do not care about or touch Jest Snapshots, I despise them

            • My tests are fast enough because I write isolated tests with TDD, so I don't run into performance issues. Example: I write my tests in a way that I can run 300 tests in literally 1 second with mocha. So the Jest ability to pinpoint and only run those tests which are affected by code changes. I want to run all of them every time when I TDD. It's a different mindset when you TDD

            • I also mainly code in IntelliJ or WebStorm because I feel the tools in that IDE far surpass VSCode and I also love running the test UI runner in it vs. lousy command-line

            • I feel both mocha and Jest read just fine in terms of code readability. Jest might have shorter assertion syntax but I don't really care. I just care that I can read the damn test and my tests are written well and my test descriptions, as well as the code itself including constants represent business language, not technical. I care most about BDD, clean code, 4 rules of simple design, and SOLID

            • I don't like using mock frameworks so no I don't use Jest's Mocking framework. I don't have to mock a lot in my tests due to the nature of how I strive to code...I keep my design simple and modular using principals such as clean code and 4 rules of simple design. If I must mock, I create very simple custom mocks with JS

            • On the contrary to the belief that integration tests and mount are the way to go (this belief drives me absolutely crazy, especially Dodd's promoting that), I TDD with shallow & enzyme. My tests are simple. My design is driven by my tests and my tests give me quick and useful feedback. I have a course I'm working on coming out soon on TDD with React to show you how to truly test the FE and why the ice cream cone and trophy suck (you're being scammed people). Watch for that here: https://twitter.com/DaveSchinkel/status/1062267649235791873

            Don't forget to upvote this post!

            Mocha Jest JavaScript React @jsdom Enzyme #tdd #bdd #testdrivendevelopment

            See more
            Cypress logo

            Cypress

            2.4K
            2K
            115
            When testing is easy, developers build better things faster and with confidence.
            2.4K
            2K
            + 1
            115
            PROS OF CYPRESS
            • 29
              Open source
            • 22
              Great documentation
            • 20
              Simple usage
            • 18
              Fast
            • 10
              Cross Browser testing
            • 9
              Easy us with CI
            • 5
              Npm install cypress only
            • 2
              Good for beginner automation engineers
            CONS OF CYPRESS
            • 21
              Cypress is weak at cross-browser testing
            • 14
              Switch tabs : Cypress can'nt support
            • 12
              No iFrame support
            • 9
              No page object support
            • 9
              No multiple domain support
            • 8
              No file upload support
            • 8
              No support for multiple tab control
            • 8
              No xPath support
            • 7
              No support for Safari
            • 7
              Cypress doesn't support native app
            • 7
              Re-run failed tests retries not supported yet
            • 7
              No support for multiple browser control
            • 5
              $20/user/thread for reports
            • 4
              Adobe
            • 4
              Using a non-standard automation protocol
            • 4
              Not freeware
            • 3
              No 'WD wire protocol' support

            related Cypress posts

            Kamil Kowalski
            Lead Architect at Fresha · | 28 upvotes · 4M views

            When you think about test automation, it’s crucial to make it everyone’s responsibility (not just QA Engineers'). We started with Selenium and Java, but with our platform revolving around Ruby, Elixir and JavaScript, QA Engineers were left alone to automate tests. Cypress was the answer, as we could switch to JS and simply involve more people from day one. There's a downside too, as it meant testing on Chrome only, but that was "good enough" for us + if really needed we can always cover some specific cases in a different way.

            See more
            Robert Zuber

            We are in the process of adopting Next.js as our React framework and using Storybook to help build our React components in isolation. This new part of our frontend is written in TypeScript, and we use Emotion for CSS/styling. For delivering data, we use GraphQL and Apollo. Jest, Percy, and Cypress are used for testing.

            See more
            Git logo

            Git

            297.1K
            178.5K
            6.6K
            Fast, scalable, distributed revision control system
            297.1K
            178.5K
            + 1
            6.6K
            PROS OF GIT
            • 1.4K
              Distributed version control system
            • 1.1K
              Efficient branching and merging
            • 959
              Fast
            • 845
              Open source
            • 726
              Better than svn
            • 368
              Great command-line application
            • 306
              Simple
            • 291
              Free
            • 232
              Easy to use
            • 222
              Does not require server
            • 27
              Distributed
            • 22
              Small & Fast
            • 18
              Feature based workflow
            • 15
              Staging Area
            • 13
              Most wide-spread VSC
            • 11
              Role-based codelines
            • 11
              Disposable Experimentation
            • 7
              Frictionless Context Switching
            • 6
              Data Assurance
            • 5
              Efficient
            • 4
              Just awesome
            • 3
              Github integration
            • 3
              Easy branching and merging
            • 2
              Compatible
            • 2
              Flexible
            • 2
              Possible to lose history and commits
            • 1
              Rebase supported natively; reflog; access to plumbing
            • 1
              Light
            • 1
              Team Integration
            • 1
              Fast, scalable, distributed revision control system
            • 1
              Easy
            • 1
              Flexible, easy, Safe, and fast
            • 1
              CLI is great, but the GUI tools are awesome
            • 1
              It's what you do
            • 0
              Phinx
            CONS OF GIT
            • 16
              Hard to learn
            • 11
              Inconsistent command line interface
            • 9
              Easy to lose uncommitted work
            • 8
              Worst documentation ever possibly made
            • 5
              Awful merge handling
            • 3
              Unexistent preventive security flows
            • 3
              Rebase hell
            • 2
              Ironically even die-hard supporters screw up badly
            • 2
              When --force is disabled, cannot rebase
            • 1
              Doesn't scale for big data

            related Git posts

            Simon Reymann
            Senior Fullstack Developer at QUANTUSflow Software GmbH · | 30 upvotes · 11.1M views

            Our whole DevOps stack consists of the following tools:

            • GitHub (incl. GitHub Pages/Markdown for Documentation, GettingStarted and HowTo's) for collaborative review and code management tool
            • Respectively Git as revision control system
            • SourceTree as Git GUI
            • Visual Studio Code as IDE
            • CircleCI for continuous integration (automatize development process)
            • Prettier / TSLint / ESLint as code linter
            • SonarQube as quality gate
            • Docker as container management (incl. Docker Compose for multi-container application management)
            • VirtualBox for operating system simulation tests
            • Kubernetes as cluster management for docker containers
            • Heroku for deploying in test environments
            • nginx as web server (preferably used as facade server in production environment)
            • SSLMate (using OpenSSL) for certificate management
            • Amazon EC2 (incl. Amazon S3) for deploying in stage (production-like) and production environments
            • PostgreSQL as preferred database system
            • Redis as preferred in-memory database/store (great for caching)

            The main reason we have chosen Kubernetes over Docker Swarm is related to the following artifacts:

            • Key features: Easy and flexible installation, Clear dashboard, Great scaling operations, Monitoring is an integral part, Great load balancing concepts, Monitors the condition and ensures compensation in the event of failure.
            • Applications: An application can be deployed using a combination of pods, deployments, and services (or micro-services).
            • Functionality: Kubernetes as a complex installation and setup process, but it not as limited as Docker Swarm.
            • Monitoring: It supports multiple versions of logging and monitoring when the services are deployed within the cluster (Elasticsearch/Kibana (ELK), Heapster/Grafana, Sysdig cloud integration).
            • Scalability: All-in-one framework for distributed systems.
            • Other Benefits: Kubernetes is backed by the Cloud Native Computing Foundation (CNCF), huge community among container orchestration tools, it is an open source and modular tool that works with any OS.
            See more
            Tymoteusz Paul
            Devops guy at X20X Development LTD · | 23 upvotes · 9.7M views

            Often enough I have to explain my way of going about setting up a CI/CD pipeline with multiple deployment platforms. Since I am a bit tired of yapping the same every single time, I've decided to write it up and share with the world this way, and send people to read it instead ;). I will explain it on "live-example" of how the Rome got built, basing that current methodology exists only of readme.md and wishes of good luck (as it usually is ;)).

            It always starts with an app, whatever it may be and reading the readmes available while Vagrant and VirtualBox is installing and updating. Following that is the first hurdle to go over - convert all the instruction/scripts into Ansible playbook(s), and only stopping when doing a clear vagrant up or vagrant reload we will have a fully working environment. As our Vagrant environment is now functional, it's time to break it! This is the moment to look for how things can be done better (too rigid/too lose versioning? Sloppy environment setup?) and replace them with the right way to do stuff, one that won't bite us in the backside. This is the point, and the best opportunity, to upcycle the existing way of doing dev environment to produce a proper, production-grade product.

            I should probably digress here for a moment and explain why. I firmly believe that the way you deploy production is the same way you should deploy develop, shy of few debugging-friendly setting. This way you avoid the discrepancy between how production work vs how development works, which almost always causes major pains in the back of the neck, and with use of proper tools should mean no more work for the developers. That's why we start with Vagrant as developer boxes should be as easy as vagrant up, but the meat of our product lies in Ansible which will do meat of the work and can be applied to almost anything: AWS, bare metal, docker, LXC, in open net, behind vpn - you name it.

            We must also give proper consideration to monitoring and logging hoovering at this point. My generic answer here is to grab Elasticsearch, Kibana, and Logstash. While for different use cases there may be better solutions, this one is well battle-tested, performs reasonably and is very easy to scale both vertically (within some limits) and horizontally. Logstash rules are easy to write and are well supported in maintenance through Ansible, which as I've mentioned earlier, are at the very core of things, and creating triggers/reports and alerts based on Elastic and Kibana is generally a breeze, including some quite complex aggregations.

            If we are happy with the state of the Ansible it's time to move on and put all those roles and playbooks to work. Namely, we need something to manage our CI/CD pipelines. For me, the choice is obvious: TeamCity. It's modern, robust and unlike most of the light-weight alternatives, it's transparent. What I mean by that is that it doesn't tell you how to do things, doesn't limit your ways to deploy, or test, or package for that matter. Instead, it provides a developer-friendly and rich playground for your pipelines. You can do most the same with Jenkins, but it has a quite dated look and feel to it, while also missing some key functionality that must be brought in via plugins (like quality REST API which comes built-in with TeamCity). It also comes with all the common-handy plugins like Slack or Apache Maven integration.

            The exact flow between CI and CD varies too greatly from one application to another to describe, so I will outline a few rules that guide me in it: 1. Make build steps as small as possible. This way when something breaks, we know exactly where, without needing to dig and root around. 2. All security credentials besides development environment must be sources from individual Vault instances. Keys to those containers should exist only on the CI/CD box and accessible by a few people (the less the better). This is pretty self-explanatory, as anything besides dev may contain sensitive data and, at times, be public-facing. Because of that appropriate security must be present. TeamCity shines in this department with excellent secrets-management. 3. Every part of the build chain shall consume and produce artifacts. If it creates nothing, it likely shouldn't be its own build. This way if any issue shows up with any environment or version, all developer has to do it is grab appropriate artifacts to reproduce the issue locally. 4. Deployment builds should be directly tied to specific Git branches/tags. This enables much easier tracking of what caused an issue, including automated identifying and tagging the author (nothing like automated regression testing!).

            Speaking of deployments, I generally try to keep it simple but also with a close eye on the wallet. Because of that, I am more than happy with AWS or another cloud provider, but also constantly peeking at the loads and do we get the value of what we are paying for. Often enough the pattern of use is not constantly erratic, but rather has a firm baseline which could be migrated away from the cloud and into bare metal boxes. That is another part where this approach strongly triumphs over the common Docker and CircleCI setup, where you are very much tied in to use cloud providers and getting out is expensive. Here to embrace bare-metal hosting all you need is a help of some container-based self-hosting software, my personal preference is with Proxmox and LXC. Following that all you must write are ansible scripts to manage hardware of Proxmox, similar way as you do for Amazon EC2 (ansible supports both greatly) and you are good to go. One does not exclude another, quite the opposite, as they can live in great synergy and cut your costs dramatically (the heavier your base load, the bigger the savings) while providing production-grade resiliency.

            See more