# How UVM knows "my\_test" class? why/where do we need to import "my\_pkg::\*" that holds the class "my\_test"?

**URL:** <https://verificationacademy.com/forums/t/how-uvm-knows-my-test-class-why-where-do-we-need-to-import-my-pkg-that-holds-the-class-my-test/40545>\
**Category:** UVM\
**Tags:** import, uvm-package, UVM, factory, run\_test\
**Created:** [June 19, 2022, 1:45pm UTC](https://verificationacademy.com/forums/t/how-uvm-knows-my-test-class-why-where-do-we-need-to-import-my-pkg-that-holds-the-class-my-test/40545 "2022-06-19T13:45:31Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![uriyam](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/u/b77776/32.png) [@uriyam](https://verificationacademy.com/forums/u/uriyam)\
**Post date:** [June 19, 2022, 4:14pm UTC](https://verificationacademy.com/forums/t/how-uvm-knows-my-test-class-why-where-do-we-need-to-import-my-pkg-that-holds-the-class-my-test/40545/3 "2022-06-19T16:14:55Z")

</div>

_In reply to [chr\_sue](https://verificationacademy.com/forums/t/how-uvm-knows-my-test-class-why-where-do-we-need-to-import-my-pkg-that-holds-the-class-my-test/40545/2):_

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?

---

_[View the full topic](https://verificationacademy.com/forums/t/how-uvm-knows-my-test-class-why-where-do-we-need-to-import-my-pkg-that-holds-the-class-my-test/40545)._
