Softwr

Testing · head to head

Locust vs Scrapy

Locust logo

Locust

Testing

Open-source load testing tool where scenarios are written in plain Python

From
Free
Free plan
Yes
Scrapy logo

Scrapy

Web Scraping Tools

Open-source Python framework for crawling sites and extracting data

From
Free
Free plan
Yes

The short version

  • Locust is an MIT-licensed load testing tool; Scrapy is a BSD-licensed Python framework for writing spiders.
  • Both are free.
  • Only Locust lists test scenarios written in Python; only Scrapy lists asynchronous crawling engine.
  • Where Locust falls short: scenarios must be written in Python; there is no graphical recorder.
  • Where Scrapy falls short: requires writing Python code; there is no graphical interface.

How do Locust and Scrapy differ?

Locust and Scrapy differ on platforms and category (Testing against Web Scraping Tools). Only the attributes on which Locust and Scrapy actually diverge.

Attributes where Locust and Scrapy differ
AttributeLocustScrapy
PlatformsAPIWindows, macOS, Linux
CategoryTestingWeb Scraping Tools

Identical on both: starting price (Free), pricing model (Open-source), free tier (Yes).

Not yet recorded: founded for Locust.

Which features does each one have?

They share no listed features; 8 appear only for Locust and 6 only for Scrapy. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in Locust

  • Test scenarios written in Python
  • Distributed load generation
  • Real-time web UI
  • Headless mode for CI/CD
  • Lightweight greenlet users on gevent
  • Extensible with custom load shapes and reporting
  • VS Code extension
  • Azure Load Testing support

Only in Scrapy

  • Asynchronous crawling engine
  • Spiders using CSS or XPath selectors
  • CrawlSpider and SitemapSpider for common crawl patterns
  • Interactive shell for testing selectors
  • Feed exports to JSON, CSV, S3 and other formats
  • Extensions for JavaScript rendering, validation and proxy rotation

What is each one used for?

Locust is most often brought in for load testing web APIs; Scrapy for large scale crawling of many pages. The jobs each tool is most often brought in to do.

Locust

  • Load testing web APIsnot Scrapy
  • Stress testing websitesnot Scrapy
  • CI performance checksnot Scrapy
  • Simulating user behaviour as codenot Scrapy

Scrapy

  • Large scale crawling of many pagesnot Locust
  • Extracting structured data into JSON or CSVnot Locust
  • Building scrapers inside Python data pipelinesnot Locust
  • Sitemap-driven site crawlsnot Locust

Where do Locust and Scrapy fall short?

Locust's most cited limit: scenarios must be written in Python; there is no graphical recorder. Scrapy's: requires writing Python code; there is no graphical interface. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Locust

  • Scenarios must be written in Python; there is no graphical recorder
  • Built mainly for HTTP; other protocols need custom code
  • Hosted runs and support come from the separate Locust.cloud service
  • Large tests need several machines configured for distributed mode

Scrapy

  • Requires writing Python code; there is no graphical interface
  • Does not execute JavaScript without an extension such as scrapy-playwright
  • Proxy rotation, anti-ban and hosting rely on add-ons or paid services
  • Deployment and monitoring need separate tooling such as Scrapy Cloud

How much do Locust and Scrapy cost?

Locust is free to use; Scrapy is free to use. Plan by plan below, from each vendor's own pricing page.

Locust

Free

No published plan breakdown. See the Locust review.

Scrapy

Free

No published plan breakdown. See the Scrapy review.

Which should you pick?

Choose Locust if

  • You need test scenarios written in python.
  • You want to start without paying.
  • You work on API.
  • You also want distributed load generation.

Choose Scrapy if

  • You need asynchronous crawling engine.
  • You want to start without paying.
  • You work on Windows, macOS, Linux.
  • You also want spiders using css or xpath selectors.

Questions people ask

Is Locust or Scrapy better?
It depends on the job. Locust fits load testing web APIs; Scrapy fits large scale crawling of many pages. Locust starts at Free and Scrapy at Free.
Which is cheaper, Locust or Scrapy?
Locust starts at Free and Scrapy at Free.
Does Locust or Scrapy run on more platforms?
Locust runs on API. Scrapy runs on Windows, macOS, Linux.
Can I use Locust for free?
Both have a free tier, so you can try either at no cost before committing.
What is Locust best used for?
Locust is most often used for load testing web apis, stress testing websites, ci performance checks, simulating user behaviour as code. Of those, load testing web apis and stress testing websites are not what Scrapy is typically brought in for.
What can Locust do that Scrapy cannot?
Locust covers Test scenarios written in Python, Distributed load generation, Real-time web UI, Headless mode for CI/CD. Scrapy covers Asynchronous crawling engine, Spiders using CSS or XPath selectors, CrawlSpider and SitemapSpider for common crawl patterns, Interactive shell for testing selectors.

Answered from the vendors’ own pages

Locust: What licence does Locust use?

The GitHub repository states the MIT licence.

Source
Scrapy: What licence does Scrapy use?

Scrapy is released under the BSD licence and is written in Python.

Source
Locust: How do I install it?

Install from PyPI with pip install locust and run locust -f locustfile.py.

Source
Scrapy: Who maintains Scrapy?

Zyte, formerly Scrapinghub, became the official maintainer in 2011. The project also has many outside contributors.

Source
Locust: Does it support distributed testing?

Yes, load can be spread across multiple machines.

Source
Scrapy: Can Scrapy scrape JavaScript-heavy sites?

Not on its own. The Scrapy site lists scrapy-playwright as an extension for JavaScript rendering.

Source
Share

Related pages

Other head to heads