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

Add PHPUnit internal helper(s) #745

Open
stloyd opened this issue Nov 6, 2023 · 5 comments
Open

Add PHPUnit internal helper(s) #745

stloyd opened this issue Nov 6, 2023 · 5 comments
Assignees
Labels
core developer experience Resolving this issue should improve development experience for the library users.
Milestone

Comments

@stloyd
Copy link
Member

stloyd commented Nov 6, 2023

We often start to do copy-paste work in tests, thus we should begin to have some reusable helpers to make our internal tests easier to maintain.

Helpers:

  • FilesystemHelper with: create, delete for files & directories,
  • ...
@stloyd stloyd added this to the 0.6.0 milestone Nov 6, 2023
@stloyd stloyd added this to Roadmap Nov 6, 2023
@stloyd stloyd added core developer experience Resolving this issue should improve development experience for the library users. labels Nov 6, 2023
@norberttech norberttech modified the milestones: 0.6.0, 0.7.0 Jan 27, 2024
@norberttech norberttech removed this from the 0.7.0 milestone Mar 11, 2024
@Bellangelo
Copy link
Contributor

Hi @norberttech , I would like to help on this. If I am not mistaken there isn't any generic place to create the new helpers. Should we create a tests directory at the root for this case?

@norberttech
Copy link
Member

hey @Bellangelo, awesome! I think I would put it inside of the src/core/etl/src/Flow/ETL/Test/... so it can be installed with ETL package together

@Bellangelo
Copy link
Contributor

Bellangelo commented Dec 28, 2024

@norberttech, i checked and the Filesystem issue that the original PR was addressing seems to be fixed. I checked a little bit around the project and I noticed that some of the Extractor's tests logic is duplicated so I created a PR for it #1291. Not sure if all the changes are needed but it is a start.

Also, since the description of this issue does not contain much info I would really appreciate it if you could add what it is missing currently.

@norberttech
Copy link
Member

Since this task was never properly explained, here is a proper description of what we are trying to achieve here:

#1291 (comment)

@norberttech
Copy link
Member

I think we can create some very generic fake extractors and define schema for them,for example

  • df()->read(from_flow_orders(limit:1_000))
  • flow_orders_schema() : Schema
  • do the same for products
  • customers
  • inventory

and we should make sure all of those datasets keep consistent schema and that they are using all possible entry types.
Those virtual datasets would need to follow
very strict backward compatibility policy and proper schema evolution.

This would make so much easier and more realistic to test not only entire pipeline but also stand-alone scalar functions as we can also create helpers that would just give us one row (and use them inside fake extractors)

@norberttech norberttech added this to the 0.11.0 milestone Jan 4, 2025
@norberttech norberttech moved this from Todo to Done in Roadmap Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core developer experience Resolving this issue should improve development experience for the library users.
Projects
Status: Done
Development

No branches or pull requests

3 participants