如何设置IntelliJ及TestNG测试的控制台输出显示在底部?
Fixing Console Output Position in IntelliJ
Hey there! Let's walk through how to adjust the console output position for both regular programs and TestNG tests in IntelliJ:
1. Make Console Output Stay at Bottom After Running Regular Programs
IntelliJ actually defaults to scrolling console output to the bottom, but if your settings got tweaked, here's how to reset it:
- After running your program, open the console panel. Look for the gear icon (console settings) in the top-right corner of the console window.
- Check the box next to
Scroll to end on outputin the dropdown menu. This ensures new output automatically scrolls to the bottom as it's generated. - If you already have existing output and want to jump straight to the latest, click the "Scroll to end" button (it looks like a downward arrow with a horizontal line) in the bottom-right corner of the console.
2. Adjust TestNG Test Output to Show at the Bottom
TestNG tests sometimes default to showing the test summary at the top of the console, but you can make the latest output stay at the bottom with these steps:
- After running your TestNG tests, switch to the corresponding TestNG console tab.
- Click the gear icon in the top-right of the console panel, and make sure
Scroll to end on outputis checked. This will keep the console scrolling to the latest test logs as they're produced. - If the console stops at the top summary after tests finish, just hit the "Scroll to end" button in the bottom-right to jump directly to the latest output. Keeping the
Scroll to end on outputoption checked will make this automatic for future TestNG runs.
内容的提问来源于stack exchange,提问作者Hen Faibish
相关产品推荐
相关产品推荐

