How upsetting is it to have a deployed ColdFusion application that is full of bugs and issues? Is the cost of going back and fixing the problems hurting your bottom line? Are you concerned that proper testing procedures were not followed during development due to time constraints or developers just not knowing the proper way to test?
You are not alone. In fact, one CIO lamented that developers “can’t imagine how to test code,” and don’t think about testing “before, during, and after development.”
What can be done to ensure thorough testing of your ColdFusion applications before deployment?
First, let’s discuss what you need to think about in order to make sure your web application is ready for deployment.
Think About the Purpose of Your Application
What is the application supposed to accomplish? It’s easy to get lost on development tangents when you don’t focus on the objectives of your application. Start by making a detailed list of your objectives, so you don’t get lost in your overall purpose.
Remember your objectives:
- Business Capability
- User Interface
- Load Capacity
When you stay focused and don’t allow yourself to get distracted, you have a guideline by which to build your testing process.
How Do I Make My Own Testing Process?
Before designing any testing processes, do a little research on test-driven development (TDD). Test-driven development is an application development process that relies on the repetition of a very short development cycle. Requirements are turned into very specific test cases, and then the software is improved to pass only the new tests. This testing method is different from application or software development that allows code and applications in your deployment system that are not proven to meet requirements.
Keeping this in mind, we could build an application testing process from the ground up.
Automated Testing Tools
Automated tools can help you speed up the process of testing throughout the development lifecycle. You may want to consider different tools for different kinds of testing, but what are most ColdFusion development teams using? The following chart from the State of the CF Union 2017 survey shows the breakdown:
Though many who completed the survey didn’t use any testing software, there are still many who use cfcUnit, MXUnit, Selenium, and TestBox.
Application Testing Process
Complete the following tests on the application before moving it to the production environment:
1. Functionality Testing – This type of testing is to ensure your application meets the requirements you set out in your development documentation. The functions to be tested include:
- HTML and CSS
- Business Workflow
2. Usability Testing – This type of testing checks whether your user can simply and easily navigate the application and complete the task they are attempting. Usability testing includes:
- Ease of Learning
- Subjective User Satisfaction
- General Appearance
3. Interface Testing – This type of testing involves the application, web, and database servers. According to softwaretestinghelp.com, you should be checking “if all the interactions between these servers are executed, and errors are handled properly. If database or web server returns an error message for any query by application server, then application server should catch and display these error messages appropriately to the users. Check what happens if the user interrupts any transaction in-between? Check what happens if the connection to the web server is reset in between?”
4. Compatibility Testing – Testing should be completed to see if the following are compatible:
- Operating System
- Mobile Browsing
- Printing Options
5. Performance Testing – This testing should be done to ensure that the application works under all types of loads. According to guru99.com, you should check:
- Application response times at different connection speeds
- Load test your application to determine its behavior under normal and peak loads
- Stress test your application to determine its breakpoint when pushed beyond normal loads at peak time.
- Test if a crash occurs due to peak load and how does the application recover from such an event
- Make sure optimization techniques like gzip compression and browser/server-side cache enabled to reduce load times
6. Security Testing – Do this testing on all types of applications, especially e-commerce apps. The type of testing includes:
- Unauthorized access to secure areas should not be allowed
- Sessions are routinely killed after extended inactivity
- Restricted files must not be downloadable without appropriate access
- When using SSL certificates – -which is highly recommended–, the application should redirect to encrypted SSL areas.
The lack of a useful test environment can create chaos during the run-up to deploying new code. The benefits of having a modern, mature testing environment are great. Getting testing and user feedback has benefits that include:
- Testing speeds up delivery because thorough user testing will ensure you don’t run into problems after deployment.
- When testing gets pushed back, it holds up other tasks and wastes project management and developer time. They are on the hook to complete the project, but without user feedback they are stuck.
For more information on thorough testing, check out the following:
- ColdFusion Alive Podcast #012 – Extreme Testing and Slaying the Dragons of ORM with Luis Majano
- Web Application Testing: 8 Step Guide to Web Testing – guru99.com
- Web Testing Complete Guide (Web Application Testing Tips and Scenarios) – SoftwareTestingHelp.com
Setting up a testing environment to ensure thorough testing before, during, and after development will ensure you don’t have any issues after deployment. Training your developers to the finer points of testing may take time and money, but is relatively easy and will save you resources in the long run.
If you test thoroughly and test often, you will see the difference on your bottom line.
And to continue learning how to make your ColdFusion apps more modern and alive, I encourage you to download our free ColdFusion Alive Best Practices Checklist.
Because… perhaps you are responsible for a mission-critical or revenue-generating CF application that you don’t trust 100%, where implementing new features is a painful ad-hoc process with slow turnaround even for simple requests.
What if you have no contingency plan for a sudden developer departure or a server outage? Perhaps every time a new freelancer works on your site, something breaks. Or your application availability, security, and reliability are poor.
And if you are depending on ColdFusion for your job, then you can’t afford to let your CF development methods die on the vine.
You’re making a high-stakes bet that everything is going to be OK using the same old app creation ways in that one language — forever.
All it would take is for your fellow CF developer to quit or for your CIO to decide to leave the (falsely) perceived sinking ship of CFML and you could lose everything—your project, your hard-won CF skills, and possibly even your job.
Luckily, there are a number of simple, logical steps you can take now to protect yourself from these obvious risks.
No Brainer ColdFusion Best Practices to Ensure You Thrive No Matter What Happens Next
ColdFusion Alive Best Practices Checklist
Modern ColdFusion development best practices that reduce stress, inefficiency, project lifecycle costs while simultaneously increasing project velocity and innovation.
√ Easily create a consistent server architecture across development, testing, and production
√ A modern test environment to prevent bugs from spreading
√ Automated continuous integration tools that work well with CF
√ A portable development environment baked into your codebase… for free!
Learn about these and many more strategies in our free ColdFusion Alive Best Practices Checklist.