I am trying to write some smart UI tests using XCUITest. Now I want to build a test suite such that, depending on my applications ViewController I make deduce what type of testing happens. Example would be I have a monkey test running in a loop, On some view controllers of my app I would like taps on the full screen, however on other view controllers i'd like taps only on a part of the screen, With what I've seen UI tests are bundeled and run in UITestRunner and my application being tested is the target application, Is there anyway I can access properties of View Controllers of the target applications ?
No, you can not access view controller properties at run time from UI test code because the UI test runner is a separate executable to the app (where the view controller would be accessible).
UI tests are high-level integration tests for testing functionality at the UI level. You can only give input via touch and only receive output via the UI.
If you need to test something that requires access to view controller properties, you need to use a unit test. Unit tests run in the same executable environment as the app so you can access particular properties of the objects you've made.
If you want to make the UI test interact with different pages differently, think about narrowing the list of available elements to tap, and identify particular pages to further filter the list by looking for an element unique to each page. Check out the page object model for an idea about how to scale your UI tests for multiple pages.