From unit tests to continuous integration for Excel files. Write your Excel tests in Python. See also: https://www.youtube.com/watch?v=CHaNnYhb9Sw and https://github.com/xlwings/excel-automated-testing
8. Meetup Organisation
8
• Community event
• About any innovative solution for Excel,
not just those based on xlwings
• Contact me if you want to give a talk
(short or long) in one of the next
meetups
12. What is a unit test (Python sample)?
12
Python function
that we want to test
Unit test:
OK or FAIL
13. Map VBA functions to Python
13
VBA function
Calling the
VBA
function
from Python
14. VBA unit test boilerplate
14
run at the
beginning
and end of
the test
suite,
respectively
actual test
15. What can be tested in Excel?
15
1) Unit test: E.g. a cell formula, a VBA function
or an xlwings UDF
2) Integration test: E.g. running an entire
macro or testing the effect of a cell change
on the whole workbook
3) Cell logic test: Test dynamic tables
4)Alternative implementation test: E.g.
comparing a VBA function with a function
available in (a tested) 3rd party library