NAnt Specflow tests are running slow through cruise control - integration

I've been running Specflow tests using Watin, NAnt, and Cruise Control. When ever I build the project through cruise control, the Specflow tests are taking forever. But if I remote into the server and build it manually and run the specflow tests manually, that no longer occurs. It seems like steps which navigate using the GoTo function in Watin are taking forever, normally 100+ seconds. But they don't seem to be timing out because the tests are passing anyway.
Anybody have this problem before? What did you do to solve it?

Related

Magento EE database has no triggers

I inherited a heavily-customized Magento EE project that has been through multiple stages of disaster. The production database has never been pulled down to lower environments in the roughly two years of the project. It appears the production database has no triggers defined, but all the lower databases (dev, test, etc), do have triggers, which is what you'd expect in a Magento EE project.
At this point I'm not even sure how the application is still running on production. I'm loading a triggerless mysqldump that I took from prod into another environment now to see if the database actually works.
Has anybody ever seen this before? How would this even happen? Maybe the project started out on CE and then was upgraded to EE and the upgrade failed partially? I'm at a loss.
As far as I can tell, this was caused by the upgrade path from CD to EE, and I guess the previous consultants hacked the upgrade process to not create triggers, or it failed and they didn't notice. Triggers are only necessary if you're reindexing via cron job, not after save, so the app still runs ok.

SSIS package failing from SQLagent

I have a scheduled SQL job, it runs a SSIS package. The package contains a script task. I have faced on issue that SqlAgent is unable to trigger the package. After lot of investigation I could not find a direct solution and did a work around to execute the package through operating systems(cmdexe) step rather than sql server integration services type step. Now its running fine. However sometimes the job is failing and in the logs its throwing some error "Exception has been thrown by the target of an invocation." by script task. This is issue is coming randomly. when I run the same package manually from integration services catalog its running fine. But why is this happening only with SQlAgent that too sometimes??. Did anyone ever faced this issue. Please help.

How to deal with overwhelming Jenkins updates to core and plugins?

I love Jenkins and appreciate that it is an active project. Still, I don't know what would be the correct approach for maintaining a Jenkins installation because I do see Jenkins+plugins updates daily and this takes too much time to update them.
Is there a way to automate this or a LTS version that I can use instead?
The Jenkins team do have a concept of LTS releases, so take a look at this Wiki: https://wiki.jenkins-ci.org/display/JENKINS/LTS+Release+Line
As for automating updates, you can do it if you've installed Jenkins using a package manager at the OS level. For instance, on ubuntu you could have a cron that calls apt-get update and apt-get install jenkins at midnight. I'm not sure about automating if you've installed it manually.
However, automatic updates have a bad side, as essential plugins could potentially stop working with new updates, or bugs that have slipped through the net could cause problems.
Having said that, the quality of Jenkins seems consistently good, so it might be worth the risk for you.
As far as I know there isn't a way to automate the update.
However, given the fact that an update could (in theory, Jenkins has been completely stable in my experience) break something in your build process, I don't think automating would be an appropriate solution.
What seems to work well for me is to periodically do the updates manually and then re-run all of the build jobs to verify that nothing has broken. I do this as part of our regular maintenance when we do VM backups and operating system updates on our CI environment. (The updates are done after the backups so that if something does go wrong, we have an up-to-date fall back point..)

WebDriver test using Google Chrome hangs when executed via build process using TFS/NUnit

I'm having an issue with Selenium WebDriver, Microsoft Team Foundation Server, NUnit and Chrome/ChromeDriver. I'm hoping that maybe someone can offer some insights or point me in a direction to investigate. Right now I'm stymied on this issue.
The details of the problem -
I have discovered that my selenium test automation is hanging when the tests are called by our automated build process (Microsoft Team Foundation Server) using Google Chrome as the Test browser. Essentially TFS builds via MSBuild and then calls NUnit, which in turn executes my Selenium tests. I can see in Windows Task Manager (and in the build logs) that the nunit-console, nunit-agent, Google Chrome and ChromeDriver processes are launched but then the processes appear to just hang.
Again, this only repros when the test is automatically kicked off on our build machine using Google Chrome as the browser to test against. I verified that the account running TFS is an admin and this issue doesn't manifest itself when I use Firefox as the browser for our automation run/build process.
I wrote a bunch of debugging statements in the code and managed narrow down the hang to lines such as this:
IWebElement element =driver.FindElement(By.XPath(strXpath));
The strXpath value for the above statement is this:
//ul[contains(#class,'topnew')]
I have tried changing the By selector to search for an element with a css class or Id such as this but I still see the issue:
element = driver.FindElement(By.ClassName("topnew"));
Here is the very last few statements in the ChromeDriver log:
[157.979][FINER]: Waiting for all views to stop loading...
[216.963][FINE]: Command received (/session/43fb268cae9e2131577d6fdddedb5c7f/refresh
[216.963][FINER]: Waiting for all views to stop loading..
Here is the Software running on our build machine-
Selenium version 2.18.0.0 (I have also tried 2.14.0.0) using the .Net binaries (the tests are written in C#)
Nunit version 2.5.9.10348
Windows Server 2008 R2
Chrome version 16.0.912.77
ChromeDriver.exe version 18.0.995.0 (windows version)
Microsoft Team Foundation Server 2010 – version 10.0.30319
As a workaround I tried getting MSBuild to call a powershell script that then calls NUnit but the issue still persists.
This is a known bug. I ended up wrapping the call using a gevent timeout, so if chromedriver locks up, I can simply kill it and restart it.

System.Data.OracleClient.OracleConnection throws type initializer exception

I would like to ask help for a problem that I am facing. I was running a long task within a website. Because it was taking some time to process the task, I decided to change the structure. Shortly, now I am calling an exe from the website and monitoring the process. All is fine on my development environment. But when I try to run the exe on my prod environment, I get the following exception message. I use System.Data.OracleClient to connect to Oracle database.
The type initializer for 'System.Data.OracleClient.OracleConnection' threw an exception.
This happens when I call the exe from the website. I created a winforms app to test the exe. And if I call the exe from my winforms app (in the same way that I call from the website) everything works fine.
I searched the exception online. There were 2 suggestions I found.
1-) Different version of Oracle Client : This is why I created the test winforms app. It ran all fine. So I don't think Oracle client is the issue unless I'm missing something.
2-) 32-bit/64-bit OS issue : I initially compiled the exe targeting 32 bit environment. And my prod environment is 64 bit. So I tried to compile targetting 64 bit but got the same exception. Plus, 32-bit exe runs without any problems with my winforms test application. Also my development environment is 64bit as well, but I don't get the exception there.
Any ideas will be appreciated...
EDIT : I couldn't find a solution to type initializer exception. Actually I didn't have time to dig into it. So what I did instead is to call a winforms exe and simulating it's button click to call the actual exe. I didn't like the solution but I had to move on. I am no more getting the OracleConnection exception.