Add Backward and Forward Compatibility Unit tests #110922

Open
opened 2023-08-08 13:04:51 +02:00 by Bastien Montagne · 0 comments

This task is a proposal to implement some more consistent and covering compatibility testing.

Currently, we only get some flaky, fuzzy backward compatibility testing as indirect by-product of some other unittests, which often open test blendfiles that were generated by older Blender versions. This is however totally inconsistent and unreliable.

And there is no forward compatibility test at all.

Type of Blendfile for testing

Testing could use simple small, few-features testing files, complex 'full-featured' files (e.g. from Blender studio productions), or a mix of both.

  • Small, few-features files:
    • + Have a small file size.
    • + Cover a well-defined area.
    • + Make finding actual issue in case of failure easier.
    • + Are fast to process.
    • - Are (very) tedious to create and maintain.
    • - Will never cover as much as complex files, if nothing else because they will not cover complex interactions between different areas of code.
  • Big, full-featured production files:
    • + Are already available (to some extent)
    • + Have lower maintenance overhead.
    • + Cover a lot with only a couple of files.
    • + Cover complex interactions between different areas of Blender.
    • + Cover issues that would only show up with bigger set of data.
    • - Are (very) big files
    • - Are slower to process
    • - Will not be as easy to investigate in case of failure.

In any case, this set of file should be clearly grouped (in a specific folder, with their blender version in their file names).
Every time a new release is done, matching files should be added (or updated, in case of corrective releases).

Compatibility Testing Process

A good part of the issues should be detected by simply opening the blendfile. A few common operations could be added on top to cover even more potential cases:

  • Opening.
  • Changing current frame.
  • Select an armature object and switch to Pose mode.
  • Select one object for all available object types and switch to Edit mode.
  • Render one frame.
  • ...

Backward Compatibility

Supporting this is relatively easy. the testing code (likely a python script) simply list all testing files, filters them based on the expected supported versions, and process them one after the other.

In case a failure is detected, and it is decided to not fix it (and it does not violates the compatibility policy, the minimum supported/tested version can be raised.

Forward Compatibility

This is slightly more involved to get working. The process is essentially the same as for the backward compatibility case, but the future versions of Blender need to be available.

The simplest solution would probably be for the tool to download the official release builds (within the expected range), and open the current version's test blend files with all these older builds.

Potential Issues

This proposal can raise some practical issues:

  • File size: especially if targeting production files for tests, this will likely add over 10Gb or more to the testing repository.
  • Processing time: opening heavy (or many) blendfiles in many Blender versions will take time, potentially a lot of time.
  • Maintenance:
    • Need to often update file(s) for the Blender version(s) in development.
    • Need to update file(s) for every release (including corrective releases, also for all LTS ones).
This task is a proposal to implement some more consistent and covering compatibility testing. Currently, we only get some flaky, fuzzy backward compatibility testing as indirect by-product of some other unittests, which often open test blendfiles that were generated by older Blender versions. This is however totally inconsistent and unreliable. And there is no forward compatibility test at all. ## Type of Blendfile for testing Testing could use simple small, few-features testing files, complex 'full-featured' files (e.g. from Blender studio productions), or a mix of both. * Small, few-features files: * `+` Have a small file size. * `+` Cover a well-defined area. * `+` Make finding actual issue in case of failure easier. * `+` Are fast to process. * `-` Are (very) tedious to create and maintain. * `-` Will never cover as much as complex files, if nothing else because they will not cover complex interactions between different areas of code. * Big, full-featured production files: * `+` Are already available (to some extent) * `+` Have lower maintenance overhead. * `+` Cover a lot with only a couple of files. * `+` Cover complex interactions between different areas of Blender. * `+` Cover issues that would only show up with bigger set of data. * `-` Are (very) big files * `-` Are slower to process * `-` Will not be as easy to investigate in case of failure. In any case, this set of file should be clearly grouped (in a specific folder, with their blender version in their file names). Every time a new release is done, matching files should be added (or updated, in case of corrective releases). ## Compatibility Testing Process A good part of the issues should be detected by simply opening the blendfile. A few common operations could be added on top to cover even more potential cases: * Opening. * Changing current frame. * Select an armature object and switch to Pose mode. * Select one object for all available object types and switch to Edit mode. * Render one frame. * ... ## Backward Compatibility Supporting this is relatively easy. the testing code (likely a python script) simply list all testing files, filters them based on the expected supported versions, and process them one after the other. In case a failure is detected, and it is decided to not fix it (and it does not violates the [compatibility policy](https://wiki.blender.org/wiki/Process/Compatibility_Handling), the minimum supported/tested version can be raised. ## Forward Compatibility This is slightly more involved to get working. The process is essentially the same as for the backward compatibility case, but the future versions of Blender need to be available. The simplest solution would probably be for the tool to download the official release builds (within the expected range), and open the current version's test blend files with all these older builds. ## Potential Issues This proposal can raise some practical issues: * File size: especially if targeting production files for tests, this will likely add over 10Gb or more to the testing repository. * Processing time: opening heavy (or many) blendfiles in many Blender versions will take time, potentially a lot of time. * Maintenance: * Need to often update file(s) for the Blender version(s) in development. * Need to update file(s) for every release (including corrective releases, also for all LTS ones).
Bastien Montagne added this to the Platforms, Builds Tests & Devices project 2023-08-08 13:04:53 +02:00
Raul Fernandez Hernandez changed title from Add Backward and Forward Compatibility Unittests to Add Backward and Forward Compatibility Unit tests 2024-03-24 16:53:17 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#110922
No description provided.