[edk2-devel] question about UnitTest Framework

Michael D Kinney michael.d.kinney at intel.com
Wed Aug 19 15:17:33 UTC 2020


Hi,

I would also like to add that UEFI SCTs and Unit Testing are different scopes of testing.

The UEFI SCTs are system level conformance tests that require and entire platform FW image to execute on a platform and they focus on measuring if a conformant set of UEFI interfaces are present.  The UEFI SCTs need to run correctly no matter what the underlying implementation is, so these are black box tests and do not have a large number of test cases against each API.  We can only implement test cases based on the API definitions in the UEFI Specifications.

The UnitTestFrameworkPkg provide both host and target based testing environment, and the scope of a unit test is a single C/ASM function, and that single function can either be public APIs or internal worker functions.  It supports both black box and white box testing.  The white box testing approach allows all code paths to be exercised with different input data patterns to verify that a function works as expected for all inputs.  The host based tests run as an application and do not require a full platform FW image.  This allows the unit test to test code paths that may be very rare in full system testing or require HW to be broken to be seen in full system testing.  This means the UnitTestFrameworkPkg has the potential to provide much greater code coverage than UEFI SCTs.

Thanks,

Mike

From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Bret Barkelew via groups.io
Sent: Tuesday, August 18, 2020 11:00 PM
To: devel at edk2.groups.io; tigerliu at zhaoxin.com
Subject: Re: [edk2-devel] question about UnitTest Framework

Correct. It’s possible that we can have some sort of test reunion at some point, but SCT is largely for interfaces and spec compliance, and the UnitTest Framework is for implementation business logic, CI, and code coverage.

- Bret

From: Tiger Liu(BJ-RD) via groups.io<mailto:tigerliu=zhaoxin.com at groups.io>
Sent: Tuesday, August 18, 2020 10:17 PM
To: devel at edk2.groups.io<mailto:devel at edk2.groups.io>; Tiger Liu(BJ-RD)<mailto:TigerLiu at zhaoxin.com>
Subject: [外部] Re: [edk2-devel] question about UnitTest Framework

Hi,
After studying previous discuss mail, UnitTest Framework is work for Continuous Integration mechanism.

Code writer will provide some unit test functions, maybe they could also do code coverage test.

Thanks
-----邮件原件-----
发件人: devel at edk2.groups.io<mailto:devel at edk2.groups.io> <devel at edk2.groups.io<mailto:devel at edk2.groups.io>> 代表 Tiger Liu(BJ-RD)
发送时间: 2020年8月13日 16:03
收件人: devel at edk2.groups.io<mailto:devel at edk2.groups.io>
主题: [edk2-devel] question about UnitTest Framework

Hi, Experts:
I have a question about UnitTest Framework.

UEFI Code has included some test infrastructure, such as:
PI-SCT / SCT / FWTS etc.

So, why we introduce a new UnitTest Framework?

Is it mainly for Code Coverage test?

Thanks


保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.





保密声明:
本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#64446): https://edk2.groups.io/g/devel/message/64446
Mute This Topic: https://groups.io/mt/76163664/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20200819/8904b65e/attachment.htm>


More information about the edk2-devel-archive mailing list