Lesson 14 of 18

Invoking Other FinalBuilder Projects

Duration: 3:08 Watch on YouTube (external link, opens in new tab)

Markdown version

In this lesson

Roy Osherove reuses a whole project by including the calculator UI testing demo project that comes with FinalBuilder (external link, opens in new tab) in his own project with an include project action, which can also send variables to it and shares the host and environment variables. Once he puts it inside the try, the calculator tests run after the downloads, and their full log is included in the project's own build log.

Transcript

400 words

[00:04] (external link, opens in new tab) Now let's say that we have multiple things it would like to test and some tests need to be repeated from multiple scripts. So I'm going to show you another FinalBuilder project one that for this reason does UI testing. So I'm going to open a project here called test calc. This is actually a demo project that comes with FinalBuilder. It's usually named calculator demo Windows 7, but I've just renamed it so it's easier to launch. If I just run this project, what you'll see that it does, I'm running it now, is it actually launches the calculator

[00:41] (external link, opens in new tab) And it does multiple actions on it. And let's say that we'd like to run this as part of our own project. So, I'm going to close And now let's say I want to invoke that external project. I can say FinalBuilder. If I search for that here, I can say include project here. And the project file would be

[01:12] (external link, opens in new tab) I'll just redirect to it. But really I can just say it is the FinalBuilder project directory /estcal. I can even send variables to the project before I load it. But right now, I don't need to send anything. It will also share any host variables and environment variables and send them to that project as if I ran it on its own. So now that will run

[01:44] (external link, opens in new tab) And let's make it run just after we do So I can probably just rename it to say ran calculator tests calc tests. Let's run this. What we should see oh project structure next sibling action can is not a catch or a finally.

[02:18] (external link, opens in new tab) Oh yeah, because we it's not part of a try, I guess. So let's put that as part of the try. And now let's try and do that. Okay, so it runs the download actions. It fills up all the stuff as we wanted to. And now it actually runs the calculator tests. So it's easy to reuse code and even full projects and it will all be part of our single log file at the end as well. So everything is going to be included by default.

[02:49] (external link, opens in new tab) So if you look at the build log, what we should see in the try is that we have calculator tests and then we have the full log for that as well included in our own local build file log.