Running Selenium in parallel from .NET seems to be a problem because, as of the time of this writing, I’ve yet to find a viable way of running selenium test on multiple browsers using Selenium Grid. This doesn’t mean that there aren’t a few articles out there that have some kind of solution. But they’ve never satisfied me as something that I could easily plug into my already created test. While my preferred testing tools are NUnit and SpecFlow, the method I am about to propose should work with any existing test harness you might want to use. The only prerequisite is that you are using Page Models to wrap your access to any particular web page. This article assumes that you already:
- know how to write Selenium tests
- know how to use Selenium Grid
- know how to use the Page Model pattern
- know how to use your chosen test harness.
Did you know that when you are dealing with numbers, by default, .NET will do, or try to do exactly what you tell it to do? If you tell it to do the impossible, it will do the next most logical thing. It won’t throw any errors in the process.
When my kids were young, my wife introduced a concept for this question that she got from her family that is so brilliant in its simplicity that I wonder that this isn’t common knowledge with all parents. Something they should tell you during Lamaze class. When the kids asked, “Are we there yet?” Which they did very infrequently, we would answer, “Just a few more units.” If you think about it, it is just about as helpful as any other answer we could have given them, “Just a few more hours.”, “Just a few more miles.”, “Sure, get out of the car.” (While continuing to drive the car down the road.) Or “Does it look like we are there yet?” What does the child want to know? Nothing, they are just expressing their displeasure at still being in the car.
A couple of weeks ago, I talked a bit about how we name things. Specifically, I talked about the
That’s what I kept asking myself every time I saw this product. Well, the last time I looked, something caught my eye enough that I decided to download it and take a look. I’m really glad I did it. So, let me attempt to explain what
One of the hardest things we do as programmers is naming things. But the easiest thing to name is counter variables and most of us do it wrong several times a day. Of course, I’m talking about the notorious habit of naming our counter variables I, J, or K depending on how far down we’ve nested our looping.
Today I thought I’d talk to you about the programming principle known as DRY. As you may know, DRY stands for “Don’t Repeat Yourself” and it shows up in a lot more places than you might expect. Even when you try really, really hard to not repeat yourself, you end up repeating yourself. You repeat yourself even when you think you aren’t. Lots of people repeat themselves. Do you know of any? Ok. I think you get the point. Just like it is silly for me to repeat myself over and over again, it is silly for you to write the same code, or perform the same steps, over and over again.