Integration Testcases
Before doing a release or merging a substantial patch, it might make sense to run some test cases to compare the current thunar behavior/performance with the latest release. That is, in order to prevent regressions.
For all tests, do the following:
- Enable folder specific setting
- Enable intermediate files on copy
- Enable thumbnailing (Always)
Memory Leakage
- Run all below testcases with “valgrind thunar/thunar”
- check used ram of thunar in taskmanager after each test and compare with previous thunar version
- Ram at least should not increase dramatically
- Build thunar with
./autogen.sh --enable-debug=full
- Check if any leakage is reported during testing (report done when closing thunar)
- See the last post of this issue for known leaks. Make sure no new leaks were added.
Performance
- Preparation for testing
- Open a folder in list view + shortcuts pane
- Open the same folder in icon view + tree pane
- Open a terminal in that folder
- File IO
- File Creation:
for i in {1..20000}; do touch “$i”; done
- STRG+A on both views to select them all
- File Deletion:
for i in {1..20000}; do rm “$i”; done
- Trashing1
- Empty trash (to get a clean start)
for i in {1..500}; do touch “$i”; done
- Select and copy them all (STRG+A + STRG+C + STRG+V)
- STRG+A + right click –> trash
- Press Undo
- Press Redo
- Open trash folder with both windows
- Empty trash
- Trashing2
- This one currently freezes thunar for ~10sec (issue #141)
mkdir test && cd test
for i in {1..10000}; do touch “$i”; done
gio trash *
Synchronization
- File Monitoring
- Each terminal command should update the thunar views accordingly
- Open a folder in list view on some local folder + shortcuts pane
- Open the same folder in icon view + tree pane
- Open a terminal in that folder and create a some files
touch file1
touch file2
touch .hidden
- Open all files as well in the bulk renamer
- check G_FILE_MONITOR_EVENT_MOVED_OUT:
mv file1 ..
- check G_FILE_MONITOR_EVENT_MOVED_IN:
mv ../file1 .
- check G_FILE_MONITOR_EVENT_RENAMED
- Hidden files - Do the following first with show-hidden enabled on both windows, and then with having it disabled
mv .hidden hidden
mv hidden .hidden
- Save file via mousepad (creates some temp files and then replaces the original one via rename/move)
- Create and enter some folder
foo
. Press back and then rename that folder via F2.
- G_FILE_MONITOR_EVENT_CHANGED
- Sort files by date in both views
touch file1
should bring file1 to toptouch file2
should bring file2 to top- Check if the same works if saved via mousepad
- G_FILE_MONITOR_EVENT_DELETED
rm .hidden
(try that with and without having hidden files enabled in both views)- for i in {1..1000}; do touch test; rm test; done (no ghost files should remain)
- On a gvfs mount
- Open some folder at sftp://user@localhost
- Create, rename, delete a file via thunar (The changes have to be visible in thunar)
- Open the same folder via local path. A file created there should show after F5