question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Optional lazy load for scheme

See original GitHub issue

Our use case: we have no existing file with the specification, only apispec. We can generate docs from it, but:

  • Schemathesis must generate test cases BEFORE running any tests, on the stage of tests collecting.
  • Flask app initialization happens in a fixture, before running the first test.

I thought about laziness for test cases generation but looks like there is no way to do it. Maybe, only some kind of subtests inside existing test 🤔

My decision, for now, is keeping schemathesis tests as a separate script, outside of main tests. However, it makes difficult to run it on CI: you have to run the dev server on background, and only after that run the script and test swagger spec.

Let’s think, how to make test cases generation lazy. If it’s possible on existing implementation (somehow nest test generation into test function, and don’t fail on the first assert), code example somewhere in docs would be very helpful.

Some ideas: https://github.com/kiwicom/schemathesis/pull/36#issuecomment-530325742

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Stranger6667commented, Sep 24, 2019

Hello @orsinium 😃

The relevant feature is released in 0.6.0. Please, see the example here - https://github.com/kiwicom/schemathesis#lazy-loading

And feel free to re-open if it wouldn’t work for you

0reactions
Stranger6667commented, Sep 25, 2019

I’m very happy to hear it 😃 Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

One-to-one lazily load with optional=false but how to save ...
1 Answer 1 ... The optional attribute is not there to force lazy loading. It is defined in the JPA 2.0 specification as...
Read more >
Lazy Loading: How It Decreases Load Time and Increases ...
With lazy loading, a web page loads only required content at first, and waits to load any remaining page content until the user...
Read more >
How To Add Lazy Loading To WordPress - Elegant Themes
Lazy loading is a tool that can help you drastically decrease loading times across your website. Here's what you need to know about...
Read more >
The Complete Guide to Lazy Loading Images | CSS-Tricks
Wondering how lazy loading images works? It's an important thing to understand as it can really speed up the loading of your page...
Read more >
Lazy Loading Images: Complete Guide Plus 3 Ways to ...
In this guide, we go through all the intricacies of lazy loading images, and talk over three different ways of implementing it.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found