I am using White as my framework for my UI automation testing.
Can I use CruiseControl.NET (that is running as a service), to run the tests written by White?
I have been trying for a whole day without success.
The White framework requires interactive desktop.
The error message I am getting is : "Couldn't find main window created for application"
We don't use White but TestComplete. It should be the same advice anyway: You need to run CCNET from console instead of running as a service.
Related
I have developed some test cases using the JS framwork "UIVERI5" and execute those by running
UIVER5
in the terminal / console. Now I want to execute those test cases by integrating them into a website.
For that I am using the JS framework Angular (could switch to others). Both frameworks, UIVERI5 and Angular are installed in the same project folder and can be started seperatly using the terminal.
How is it possible to execute UIVERI5 within the runtime of the website?
Any suggestion or cluse would help.
Best regards
If anybody is wondering about that in the future:
I have found no way to start "UIVERI5" from the website.
Possible solution is to start "uiveri5.js", but I have not accomplished that.
I have switched to electron, as there is the possibility to start shell scripts.
i have created unit tests for my web project but i have come across an error whereby the tests are being ignored and Visual Studio 2012 is running my localhost instead. i cannot use localhost to run my tests as there are a lot of java resources and overlays which aren't displayed. Essentially that is the point to UI testing that you test the correct interface.
The code i used in a blank project - runs perfectly and completes the test with no issues but since i need to include this into my web project, i need a way to stop Visual Studio running the localhost and get it to execute the console application test so that my selenium webdriver can run the test properly.
using: Visual Studio 2012
Selenium (webdriver)
chrome driver (latest version)
c#.Net
example code:
IWebDriver _driver;
ChromeOptions options = new ChromeOptions();
options.AddArgument("--start-maximized");
_driver = new ChromeDriver(options);
_driver.Url = "http://theURLimTesting.com/";
var verificationErrors = new StringBuilder();
_driver.Navigate().GoToUrl("http://theURLimTesting.com/");
_driver.FindElement(By.Id("Username")).Clear();
if anyone could help me and provide a solution as to how to run these tests without excluding them from the project and without having to create a proxy - i would be very grateful, as i am very much a novice.
UPDATE: as #mutt 's answer helped steer me towards the right direction with being able to resolve my question i marked the answer as right - i have managed to configure the error and create a work around and tweaking some settings to get this to work and now i can run all tests inside of the web application properly and they all function properly with executing and closing themselves in the background when done.
Separate your unit tests from the web project and it should work. Since you have them together your webapp probably has a default start page so when you "play" it will load that and VS is scoped to that browser running on IIS Express instead of the regular browser.
Personally I would have thought it would still work since Selenium is hitting the driver package that is referencing the browser, but I'm not sure what all VS is doing when it runs the webapp. If you want it with the console then move all your unit tests to the console project and they should still work on the WebApp because they will be hitting the server version and not the locally run project.
Update:
It looks like it is process bound. So Selenium and visual studio are sharing the same process. VS2008 debugging with firefox as default browser - how to make the debugger stop/close on exit?
Update2:
It looks like you should be able to determine if the process is being utilized. Then the question would be can you just kill it in your unit test script so that it will be forced to create a new one... Programmatically determine if code is running under IIS Express
First some context; we are developing a large desktop WPF application in .NET 4.5 targeting 64 bit Windows 7 and 8. We are using Visual Studio 2012.2 (soon to be .3 then probably 2013!) and TFS 2012 (again .2 soon to be .3 then 2013).
Currently this product is all in a single large solution (just over 50 projects) yielding a WPF exe, a load of dlls and a nice MSI to install it.
We use TFS (gated and scheduled) to build the solution, its installer (WiX) and run its tests (SpecFlow for BDD and MSTest unit tests) and this is working very well.
I have a separate scheduled TFS build that deploys the MSI to physical test rig in a untrusted AD domain via a PowerShell script (see TFS2012 LabDefault.11 template deploy scripts fail with “Team Foundation Server could not complete the deployment task” for details of the challenges involved with that!)
OK so that's where I am, now I want to take things to the next step; CodedUI tests to drive full app integration test; I want to "Smoke Test" my builds.
So being a simple soul I added a new project to my products solution; a CodedUI test project.
This happily runs the locally installed product (rather then the just built one; as I ultimately want the CUIT to be running on a deployed test rig as a smoke test, and that rig has just installed the MSI I just built) and performs some UI tests with assertions.
Now my problem is with the CUIT project as part of the products solution a local test run finds and runs my CUIT tests, and this is undesired. I only want to run the CUIT tests in a lab builds test phase.
So is putting the CUIT project into the product solution a bad idea? or should it be a separate solution? Splitting them seems wrong somehow as they are related; the CUIT project is the full stack integration test for the solution's deployable application.
Can I include the CUIT in the products solution and stop the test runner seeing the tests? or is it better just to have two solutions?
What are the pros and cons folks?
Update
In the end we created a new solution containing a coded UI test project and ensured this was built with the same TFS build that built the UI solution. This allows us to load and run the coded UI tests locally without issues, the unit tests in the main UI project are left unmolested. Still seems a little disjointed but on a multiple person team per user test settings were too awkward splitting the coded UI into a different solution was simpler.
What I did was make one Solution and made a CUIT project within, I then made multiple Coded UI test's within that. This is good because using an orderedTest you can run them together and they also share a UIMap which helps too.
I also have/had this problem, because we are at the beginning of using CUIT. For now the CUIT remains in product solution. We do this because the tests should remain in memory of developers. When tests stay in on solution I'm afraid they get lost in oblivion. But indeed there is sometimes a bad feeling that the CUIT pollute the products solution, so i guess they will get their own solution after some time pass and the test become established.
Edit: If you use different Versions of Visual Studio you have to consider that for example a VS Prof. can’t build a solution with Code UI Tests. This means in “multi VS-version environments” you have to separate Coded UI Tests from “real” code.
I have created a coded web performance test. Now, I'm running the test from visual studio. I need to run it as a application or as a exe file.
Web performance test (coded or not) are only available for MS test execution engine. The only solution I found is to invoke the test through mstest.exe.
You can find more informations here
Does anyone know if it is possible to create a console application in c# that calls loads a webtest in a test project?
I have added a reference to the project but get stuck when trying to call the test from main(). I am using vs 2010 to do this.
Any ideas? Searched around but couldn't find anything on what I specifically was trying to do.
Cheers.
I don't know if you're willing to consider alternative solutions other than a Visual Studio Web Test. You could write your test using the free Telerik Testing Framework http://www.telerik.com/automated-testing-tools/free-testing-framework.aspx and it can be built into your own executable as demonstrated at http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/code-samples/general/test-as-application.aspx.
If you want to take advantage of the recorder and record your tests, there's also a way of executing the recorded test from another executable. http://www.telerik.com/automated-testing-tools/support/documentation/online-api-reference/html/overload_artoftest_webaii_design_execution_runhelper_test.htm,