Sure, I'll create a test case generator for the "Spring Tile" problem. The generator will create random mazes based on the given constraints. 

Here's a Python function to generate random test cases for this problem:

```python
import random

def generate_maze(W, H):
    # Create a maze filled with walls
    maze = [['#' for _ in range(W)] for _ in range(H)]

    # Helper function to place a character at a random position that's not a wall
    def place_random(char):
        while True:
            x = random.randint(1, W-2)
            y = random.randint(1, H-2)
            if maze[y][x] == '.':
                maze[y][x] = char
                return
    
    # Generate inner maze structure with floors
    for y in range(1, H-1):
        for x in range(1, W-1):
            maze[y][x] = random.choice(['.', '*', '.'])

    # Place the start 's' and goal 'g'
    place_random('s')
    place_random('g')
    
    return maze

def tcgen():
    # Define the dimensions of the maze
    W = random.randint(3, 500)
    H = random.randint(3, 500)
    
    # Generate the maze
    maze = generate_maze(W, H)
    
    # Convert the maze to the required input format
    input_maze = '\n'.join([''.join(row) for row in maze])
    
    # Print the dimensions and the maze
    print(f"{W} {H}")
    print(input_maze)

# Example usage
tcgen()
```

**Explanation:**
1. **generate_maze(W, H)**: This function creates a maze with the given width (W) and height (H).
   - It starts by filling the entire maze with walls ('#').
   - Then it randomly places floor tiles ('.') and spring tiles ('*') in the inner part of the maze.
   - Finally, it places the start ('s') and goal ('g') tiles at random positions that are not walls.

2. **tcgen()**: This function generates random dimensions for the maze, generates the maze itself, and then prints it in the required format.

You can call `tcgen()` to generate a new random test case each time. Adjust the random choices or constraints as needed based on the problem requirements.