Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Add setting to make Autounit only add new fixtures and not overwriting existing ones. #90

Open
seagatesoft opened this issue Jan 19, 2023 · 0 comments

Comments

@seagatesoft
Copy link
Member

If I understand correctly, if the number of request-response exchanges is greater than AUTOUNIT_MAX_FIXTURES_PER_CALLBACK, the request-response pair that will be created as fixture is selected randomly.

I think there is a case where user needs to only add fixtures and not overwriting existing ones. Usually, this is the case when user encounters new layout variation or new case to handle. On this case, user can:

  1. Enable Autounit.
  2. Run the spider using a special argument so it will only crawl pages with the new layout variation/new case.
  3. Autounit will not override existing fixtures but will only do addition.

I am proposing a new setting to determine the behaviour of Autounit, something like AUTOUNIT_FIXTURE_GENERATION with value either "overwrite" (default) or "only_add". I can try to implement this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant