View Issue Details

IDProjectCategoryView StatusLast Update
16771Development Otherpublic2020-10-22 12:40
Reporterollehar Assigned To 
PrioritynoneSeverityminor 
Status newResolutionopen 
Summary16771: Create unit-tests for all (some?) events
Description

Having events break is bad. Unit-tests would make sure we don't break compatibility by mistake, like with question attributes.

TagsNo tags attached.

Activities

DenisChenu

DenisChenu

2020-10-21 19:09

developer   ~60348

core plugins can be used for events testing.
I think it's the only way to really check it …

ollehar

ollehar

2020-10-22 11:26

administrator   ~60353

I was hoping a test suite could be created independent of installing plugins etc. We can't make a core plugin for every event in the software.

DenisChenu

DenisChenu

2020-10-22 11:32

developer   ~60355

You just check if the event happen, not if it does the functionality.

You spoke for question attributes :
4.0 : work in Question (public survey get the value) , but not when save or reload in admin GUI
4.3.22 : work in admin GUI, but not when really needed (in public survey)

ollehar

ollehar

2020-10-22 11:37

administrator   ~60356

You just check if the event happen, not if it does the functionality.

Hm! If we have a function foo() that contains event E, then we must check that the return values of foo() can be affected by E properly.

DenisChenu

DenisChenu

2020-10-22 12:37

developer   ~60360

Yes, sure : but : in my opinion it's really complex to know what exact function use it :).
It can be great to have whole, and greater to have core plugin with real usage ;)

ollehar

ollehar

2020-10-22 12:40

administrator   ~60361

Last edited: 2020-10-22 12:40

View 2 revisions

Well, then we need to do integrity tests to test that plugin. Not fun.

Issue History

Date Modified Username Field Change
2020-10-21 17:52 ollehar New Issue
2020-10-21 17:52 ollehar Description Updated View Revisions
2020-10-21 19:09 DenisChenu Note Added: 60348
2020-10-22 11:26 ollehar Note Added: 60353
2020-10-22 11:32 DenisChenu Note Added: 60355
2020-10-22 11:37 ollehar Note Added: 60356
2020-10-22 12:37 DenisChenu Note Added: 60360
2020-10-22 12:40 ollehar Note Added: 60361
2020-10-22 12:40 ollehar Note Edited: 60361 View Revisions