What does this sentence from my grammar textbook mean?
わたしは今日ほど楽しい試験をこれまでしたことはない。
I guess it means "I haven't had a test as fun as today's so far."
Your understanding is basically correct. It might be more grammatical to translate it as "I've never taken/had a test as fun as today's (so far)."
[time expression]ほど[adjectival phrase] = "as [adj] as [time]"
~ことはない is the verb ending that indicates "have never [verbed].
昨日ほど怖いお化け屋敷を見たことはない。
I've never seen a haunted house as scary as yesterday's.去年ほど面白いワールドカップを見たことはない。
I've never seen a World Cup as fun as last year's.