How to print with in test case

how to print with in test case?
command : zig build test

const std = @import("std");
const testing = std.testing;

test "test log print" {"how can i print this?\n", .{});

You need to set std.testing.log_level as it’s currently set to .err iirc.

test "example" {
    testing.log_level = .debug;
    std.log.debug("this works and you don't really need the newline", .{});

btw,Is there any way to set log level global or in build command?
I don’t want to add testing.log_level = .debug; in every test cases.

Not as far as I’m aware. I only enable it when debugging a test before trying lldb as otherwise it’s difficult to read the log.