View Issue Details

IDProjectCategoryView StatusLast Update
17241Development Accessibilitypublic2021-04-16 17:11
Reporterollehar Assigned Togabrieljenik  
PrioritynoneSeverityminor 
Status resolvedResolutionfixed 
Summary17241: Create unit-test for question attribute event plugin
DescriptionCreate two unit-tests for each function related to question attributes:

1) One happy path
2) One when failing

Might not be feasible, can investigate first.

Alternatively, create integrity test with dummy plugin using the event.
TagsNo tags attached.

Activities

DenisChenu

DenisChenu

2021-04-13 18:42

developer   ~63924

> 1) One happy path

Give me an idea of simple plugin for demo or real usage ;)
https://gitlab.com/SondagesPro/QuestionSettingsType?page=1

> 2) One when failing

More hard here ? what must fail exactly ? And adding broken plugin ? Maybe update config plugin dir before ?
ollehar

ollehar

2021-04-13 18:48

administrator   ~63925

Last edited: 2021-04-16 16:15

Testing failure = each function can fail, it's important that it fails correctly.
DenisChenu

DenisChenu

2021-04-14 09:15

developer   ~63930

Last edited: 2021-04-16 16:15

View 2 revisions

> what must fail exactly ?

Not activated plugin ?
gabrieljenik

gabrieljenik

2021-04-16 16:14

manager   ~63991

Last edited: 2021-04-16 16:15

PR: https://github.com/LimeSurvey/LimeSurvey/pull/1848

Created unit test for plugin attributes
Viewed from another point of view, it was like creating a test for the event disptcher as well.

Eventually, we could complement this with a test for question theme .
(For another ticket :) )

Issue History

Date Modified Username Field Change
2021-04-13 16:17 ollehar New Issue
2021-04-13 16:18 ollehar Description Updated View Revisions
2021-04-13 16:19 ollehar Assigned To => gabrieljenik
2021-04-13 16:19 ollehar Status new => assigned
2021-04-13 16:20 ollehar Description Updated View Revisions
2021-04-13 18:42 DenisChenu Note Added: 63924
2021-04-13 18:48 ollehar Note Added: 63925
2021-04-14 09:15 DenisChenu Note Added: 63930
2021-04-14 09:15 DenisChenu Note Edited: 63930 View Revisions
2021-04-15 15:51 gabrieljenik Summary Create unit-test for question attribute event => Create unit-test for question attribute event plugin
2021-04-16 16:14 gabrieljenik Note Added: 63991
2021-04-16 17:11 ollehar Status assigned => resolved
2021-04-16 17:11 ollehar Resolution open => fixed