#100DaysOfCode - Week07

#100DaysOfCode - Week07

In my seventh week of the #100DaysOfCode Challenge, I was able to combine two categories of coding in an interesting way. I've been working on web application development, and I've separately been working on automation. Practicing some Test-Driven Development, however, I built an automated testing bot for a web application in progress.

The Web App

The web application project is a To-do List using a Django web application framework, which is the same framework I've been working with for a couple weeks now. I've written a few automated tests for web applications in previous weeks, but in practicing a Test-Driven Development (TDD) approach, the number of tests has increased and the tests are more granular. TDD can be summed up as follows:

  1. Write an automated test of what you want to build,
  2. write just enough code to pass that test,
  3. refactor (improve) the code, if needed, and repeat.

TDD requires more coding than just building an app because of all the test writing that is required. But the extra effort is worth it because it's a great insight into Agile, which is closely associated with TDD. The tests I was writing this past week included unit tests (tests of the code from the programmer's perspective) and functional tests (tests of the code from the user's perspective).

The Testing Bot

The testing bot (I'm using the term "bot" here to refer to an automation of tasks normally done by a human) was built using Selenium to automate activity in a web browser. For example, when you're building a web page with a form on it, one way to test that would be for a human to open up a web browser, put something in the form, and then submit the form and make sure the expected result occurs. But a bot can do the same thing in a way that's more scalable.

Below is the short video that shows me running a quick series of automated unit tests and then a series of automated functional tests. The unit tests are performed in the command line, but the functional test is being performed by the bot. The bot opens a web browser, inputs text very quickly and submits the form, and then repeats another form submission.

At this point I'm nearly halfway done with the 100 days of the challenge, and it's surprising how much can be learned in that amount of time. What's not surprising is the number of things I want to automate now!

Rob Valdez, CPA, CISA, CISM, is a risk advisory services manager in Kaufman Rossin’s Boca Raton, Florida, office and provides technology consulting services, including PhishNet by Kaufman Rossin, a security awareness training service. Rob can be reached at rvaldez@kaufmanrossin.com.

To view or add a comment, sign in

More articles by Rob Valdez, CPA, CISA, CISM

  • Bitcoin 101: A Brief Introduction for Accountants

    Introduction Over time cryptocurrencies have become more mainstream, and their importance to the accounting profession…

    1 Comment
  • Quantitative Cyber Risk Assessments

    Reading time: 5 minutes Cyber threats are a high priority source of risk for many organizations. However, managing…

    1 Comment
  • Cybersecurity for Accountants: Evaluating and Managing Cyber Risk

    In the ever-changing digital world, accountants are playing a larger part in managing cybersecurity risks. Accountants…

  • Build Better Spreadsheets with ChatGPT

    Building great spreadsheets is something of a superpower for accountants and analysts. Many professionals develop their…

  • #100DaysOfCode - Week14

    For my fourteenth week of the #100DaysOfCode Challenge, I explored modern full-stack web development by building a…

  • #100DaysOfCode - Week13

    For my thirteenth week of the #100DaysOfCode Challenge, I built VizzyBot, a Twitter bot that retweets content about…

  • #100DaysOfCode - Week12

    For my twelfth week of the #100DaysOfCode Challenge, I leveraged my previous data science work into machine learning…

    1 Comment
  • #100DaysOfCode - Week11

    For my eleventh week of the #100DaysOfCode Challenge, I continued with the data science theme. Data visualization…

  • #100DaysOfCode - Week10

    For my tenth week of the #100DaysOfCode Challenge, it was all data science: visualization, analytics, and some…

    3 Comments
  • #100DaysOfCode - Week09

    For my ninth week of the #100DaysOfCode Challenge, I worked in some data visualization and even had the opportunity to…

Insights from the community

Others also viewed

Explore topics