Getting error "NameError: name 'TestedApps' is not defined"
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Getting error "NameError: name 'TestedApps' is not defined"
I am trying to launch my desktop application via TestedApps.Appname.Run() using UnitTesting(PyUnit)
But it is giving me error as "NameError: name 'TestedApps' is not defined"
Additonally, TestedApps.Appname.Run() is working fine if i am not using UnitTesting. It is working fine for simple Keyword Test and Script Test using Python language but when i executes it using Unit Testing(PyUnit) then it shows me the above error and application is not getting launched.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
because the concept and the entity TestedApps is a TestComplete specific thing, so you cannot call on it from an external source like a UnitTest (pyunit)
--
there is no such thing as a module TestedApps that you can pip install and use
Justin Kim
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
so how can i launch my application using PyUnit
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you would add code to do that? something like
https://stackoverflow.com/questions/13222808/how-to-run-external-executable-using-python/13222809
https://stackoverflow.com/questions/1811691/running-an-outside-program-executable-in-python
Justin Kim
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes it's working fine thanks, now i am able to launch my application through subprocess.call()
Also Am i be able to work on my application through the scripts i have created using TestComplete script tests in PyUnit module?
For ex - Need to login into the application and verify the logged in user. For this i have created a keyword test using python. But i want to execute it via PyUnit so is it possible?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
no thats not possible
kdt can only be ran via testcomplete or testexecute
Justin Kim
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok Thanks for the information..
Am i be able to work on my application through the Scripts Test i have created using TestComplete script tests in python language and i want to run it through PyUnit?
Scripts is created for logging into the application and verification. Does PyUnit support the objects and methods of TestComplete?
