Integration Tests for ASP.NET MVC Applications

While exploring integration testing, I came across a great article that offers a clever approach to integration and regression testing for ASP.NET MVC applications.

The techniques described in the article complement the ideas I discussed in a previous post on agile testing, and they present a streamlined method for ensuring your MVC applications perform as expected.

Check it out if you’re interested in enhancing your testing strategies for ASP.NET MVC applications.

Read More

Testing ASP.NET MVC Application with Session State

I encountered issues when trying to use session state in an ASP.NET MVC application, especially while writing unit tests for an action method that interacted with the session object.

Fortunately, I discovered MVC Contrib, which offers a range of useful tools. The TestHelper from MVC Contrib was exactly what I needed to resolve this issue.

Installation took just a few minutes, and I was up and running again quickly. Highly recommended!

Read More

Agile Testing – Reflections from an Excellent Elevate Evening

Last night’s Elevate event was another impressive showcase of the diverse knowledge within Avega. The focus was on Agile Testing, a topic that has often confused and frustrated me. I’ve struggled to implement effective agile testing practices in the teams I’ve led. Here are some of the challenges I’ve faced:

  • No Testers and No Testing in the Team: This approach led to a traditional waterfall-like process with a separate testing phase after development. We missed out on the benefits of agile methodologies.
  • Testers in the Team, But Not Doing Agile Testing: When testers were included, they still followed company policies, which meant extensive documentation and test planning for each minor change. This approach proved inefficient.
  • Testers Testing Only Sprint Work: In this setup, testers only tested the features developed during the sprint, with an acceptance test phase every 4-5 sprints. While this was better, it still led...
Read More

When is Good – Decide Already!

Over the past month, I’ve been involved in numerous meeting scheduling activities. The process always seems to involve a lot of back-and-forth with dates before finally settling on one.

If you’ve read Lean Software Development by the Poppendieck, you’re familiar with the concept of Set-based Problem Solving.

The website WhenIsGood utilizes this approach to simplify the process of finding a mutually convenient meeting time. It’s a straightforward, low-impact tool that can help streamline scheduling. You can check out their introduction video to see how it works.

This tool is a practical example of applying set-based problem-solving to everyday tasks, making the scheduling process more efficient and less frustrating.

Read More

Marcus Trying jQuery

I’m still amazed at how JavaScript has evolved. A language that many of us once dismissed has become a critical part of modern web development. Fortunately, the emergence of various JavaScript libraries means we don’t have to write everything from scratch.

One of the most talked-about libraries these days is jQuery. Initially, I thought it was just another LINQ dialect, but I quickly realized it’s far more than that. While it spares me from having to hack everything myself, I still need to get up to speed with it—and with CSS, since jQuery heavily interacts with CSS classes and other elements.

Here are some resources that have helped me get started with jQuery:

ÖreDev Day 5 – Afternoon

Cucumber

This session was quite interesting, especially given my enthusiasm for Cucumber. The presenter, Aslak Hellesøy, had an unusual prop—a blender on his desk—which added a quirky touch to the talk.

Aslak began with an introduction to Behavior-Driven Development (BDD) and Test-Driven Development (TDD). He emphasized Dan North’s ideas on BDD, highlighting its outside-in approach, which focuses on business value.

Aslak, the creator of Cucumber, showcased its basics. Although he didn’t delve into .NET or C#, there is support for these technologies, and hopefully, it integrates well with Visual Studio. Despite the blender’s lack of success, the presentation was engaging, and I plan to explore Cucumber further.

ASP.NET MVC Advanced Ninja

The next session, titled “ASP.NET MVC Advanced Ninja,” covered new features in Visual Studio 2010 and ASP.NET MVC 2.0. Here are some highlights:

  • ASP.NET 4 introduces a shorthand for HTML encoding output with...
Read More

ÖreDev Day 5 – Keynote and Morning

Information Overload and Managing Flow

The final day of ÖreDev started with a keynote by Scott Hanselman, one of my “heroes.” His talks are always insightful and humorous. Here are some key takeaways from his session:

  • Effectiveness: Doing the right things.
  • Efficiency: Doing things right (like jumping off a cliff efficiently!).
  • Triage: Sort information and avoid leaving things in your inbox. Use the “Do it – Drop it – Delegate it – Defer it” approach to manage tasks.
  • Signals vs. Noise: Sort your data streams (Twitter, email, colleagues) into these categories.
  • Email Management: Emails where you’re CC’d are less important. Avoid checking emails first thing in the morning to prevent becoming the fastest responder to all problems. Instead, check emails three times a day for 20 minutes each.
  • Work Hours: Don’t try to outwork the system by putting in more hours. Instead, use techniques like the Read More

ÖreDev Day 4 – Afternoon

I’m still feeling a bit exhausted from Dan North’s previous talk, but now it’s time for some more down-to-earth coding topics.

Putting the M of ASP.NET MVC with Scott Allen

Scott Allen started by discussing the role of the model in ASP.NET MVC and its intended audience:

  • Business objects can be useful, especially when building wrappers around SQL Management Studio, but they may not always serve the best purpose in MVC applications.
  • The model often has to cater to both the view and the business logic. To address this, Scott recommends creating a view model. While this may lead to many classes, it ensures that each class has a well-defined responsibility.
  • You can define an interface to specify which properties should be bound when using TryUpdateModel<T>.
  • Instead of using IModelBinder for model binding, which can be cumbersome, override OnModelUpdated on the default model binder...
Read More

ÖreDev Day 4 – Why Your Agile Adoption Fails with Dan North

Today’s session with Dan North was a standout. Following a somewhat disappointing morning, Dan’s talk was exactly what I needed to rejuvenate my enthusiasm.

Dan had promised a critical look at Scrum, and he delivered. Here are some key takeaways from his session:

  • “A manager in a crappy system with a certificate is still a manager in a crappy system.”
  • “Certified$crumMa$ter :)”
  • Refer to the SATIR Change Model to understand people’s resistance to change.
  • Consider the Dreyfus Model for skill acquisition stages.
  • Ken Schweiber’s assertion: “75% of un-coached Scrum projects will fail.”
  • Implement continuous integration and automated tests to reveal and address underlying issues.
  • Use assumption tests to document assumptions on legacy code.
  • Embrace Deliberate Discovery in domain understanding, architecture, and team dynamics.
  • Practice Rolling Wave Planning to detail only imminent stories.
  • Write concise stories and break features into manageable pieces.
  • Beware of “WaterScrum,”...
Read More