## Testing and QA

### Full featured/complete functional test cases before upgrade

Re: Full featured/complete functional test cases before upgrade

Tim,

I was able to find those files but I want to print out the contents of those files with the .feature filename all into a file so it's easier "to read"

I found the files by using fine and grep

find /my/moodle/location/folder -type f -print | grep '.feature'

/my/moodle/location/folder/course/tests/behat/rename_roles.feature
/my/moodle/location/folder/course/tests/behat/course_controls.feature
/my/moodle/location/folder/course/tests/behat/activities_group_icons.feature
/my/moodle/location/folder/course/tests/behat/max_number_sections.feature
......

......

How can I dump what is on each file for each filename instead of using "cat" on each file manually and coping and pasting and appending them into one big file.

Thanks

Jerry

Average of ratings: -
Re: Full featured/complete functional test cases before upgrade

Jerry,

Put this as a script or run it through your command line... this will make it look prettier

i=1
for file in find /my/moodle/location/folder/ -type f -print | grep '.feature'
do
printf "%b\n"
echo "======================================================================================"
echo "File $((i++)) :$file"
echo "======================================================================================"
printf "%b\n"
cat \$file
printf "%b\n"
done

Average of ratings:Useful (1)