How UVM knows "my_test" class? why/where do we need to import "my_pkg::*" that holds the class "my_test"?

In reply to chr_sue:

so i’m including it, it compiles…
why should I also import it in “testbench.sv” if no one is using it there?

I imagine that it needs to be imported inside the uvm_pkg, inside run_test(), maybe even in the factory, where uvm instantiate “my_test” class. but obviously we can’t inject an import into the uvm files. so what is the mechanism?