I assume you have already created your DataLoader. If so, you could write a simple loop iterating your test_loader:
model.eval()
predictions = []
with torch.no_grad():
    for data in test_loader:
        output = model(data)
        pred = F.softmax(output, 1)  # assuming your model outputs logits
        predictions.append(pred)
predictions = torch.cat(predictions)

predictions will now contain the probabilities for each sample and each class.