nus-cs2103-AY2425S1 / forum

12 stars 0 forks source link

Is AddressBook expected to work in a headless environment #541

Closed Incogdino closed 6 days ago

Incogdino commented 6 days ago

image

In our tp project, we allowed for the the desktop to be launched when using address book. However, this caused an issue in Github Actions where it gave a headless exception.

After doing some googling online, it seemed that the exception arose when the code that is dependent on a keyboard, display, or mouse is called in an environment that does not support a keyboard, display, or mouse. This is especially the case when the workflow is ran on the Ubuntu environment on GitHub Actions.

Do we assume that AddressBook will be used in a system where is it not headless? Because my current solution to resolve this test case issue is to ignore the test case when a headless OS is detected.

damithc commented 6 days ago

@Incogdino There is no requirement that your tP should be able to run in a headless environment. But as you found out, CI is run in a headless environment, and you may not be able to use CI to test features that cannot work in such an environment. So, your current workaround is compliant with tP requirements.

Incogdino commented 6 days ago

@Incogdino There is no requirement that your tP should be able to run in a headless environment. But as you found out, CI is run in a headless environment, and you may not be able to use CI to test features that cannot work in such an environment. So, your current workaround is compliant with tP requirements.

Got it! Thank you prof!