How to Write Test Cases in Embedded Development?

Follow+Star Public Account, don’t miss the wonderful content

How to Write Test Cases in Embedded Development?

Author | strongerHuang

WeChat Official Account | strongerHuang
In a small company, one person might be responsible for the entire project, covering hardware, software, and testing.
However, more formal companies tend to subdivide tasks, separating software development and testing.To avoid conflicts between software and testing, writing test cases becomes very important.

Is it necessary to write test cases?

Writing code is already busy and tiring, do I still need to spend time writing documentation?
Perhaps newcomers to the workplace cannot understand the significance of documentation; after a few conflicts with colleagues, you might realize its importance.
How to Write Test Cases in Embedded Development?
Writing technical documentation is an essential skill for engineers involved in development. Although our company is small (over a hundred people), we write various documents for each project, ranging from fifty to over a hundred documents.

How to Write Test Cases in Embedded Development?

Although writing documents takes time upfront, the benefits are numerous; it not only avoids conflicts among colleagues but also saves maintenance costs and improves development efficiency and progress.

What is a test case?

Test Case refers to a description of a testing task for a specific software product, reflecting the testing plan, methods, techniques, and strategies. Its content includes testing objectives, testing environment, input data, testing steps, expected results, testing scripts, etc., ultimately forming a document. Simply put, a test case is a set of test inputs, execution conditions, and expected results compiled for a specific goal, used to verify whether a specific software requirement is met.

— From Baidu Encyclopedia

To put it plainly, a test case is a set of testing instructions (documents) written by software for testing, which colleagues in the testing department follow to conduct tests.

How to Write Test Cases in Embedded Development?

For example: Serial Port Testing

Qualification Criteria: Receive valid data

Testing Method:

1. Use a serial port adapter to connect pin 1 (N) and pin 3 (P) of CON23;

2. After the mainboard is functioning normally (about 5 seconds after powering on), check whether there is data output from the 433 serial port using the serial port debugging assistant:

3A 2B 00 AA 56 55

Notes:

If garbled characters appear, it may be due to reversed pin connections; try reversing pins 1 and 3;

How to Write Test Cases?

Different projects may have different test cases, but the general principle is similar: it is a testing document written by developers for the testing department.
Document Information:

How to Write Test Cases in Embedded Development?

Modification Records:

How to Write Test Cases in Embedded Development?

Table of Contents:

How to Write Test Cases in Embedded Development?

Main Content:
The main content can combine some cases from large companies (some documents from large companies have leaked online, you can search for them), here are the key points, debugging and testing methods:
  • Qualification Criteria

  • Testing Methods

  • Notes

Debugging and testing methods mainly involve developers; for example, software engineers add debugging interfaces through CLI in the code, allowing debugging personnel to send commands via CLI for debugging.
For example, EEPROM Testing:

How to Write Test Cases in Embedded Development?

I won’t elaborate on more details here, specific practice is still needed.
If you have been in development for many years and still don’t know what a test case is, you need to reflect on your reasons; have you really worked seriously over the years? Haha~
———— END ————
How to Write Test Cases in Embedded Development?
● Column “Embedded Tools”
● Column “Embedded Development”
● Column “Keil Tutorial”
● Selected Tutorials from the Embedded Column
Follow the public account reply “Add Group” to join the technical exchange group as per the rules, reply “1024” to see more content.
How to Write Test Cases in Embedded Development?
How to Write Test Cases in Embedded Development?
Click “Read the Original” for more shares.

Leave a Comment