The home team had to tough it out with 14 men at the start of the second half following Jamie Bhatti’s yellow card but Townsend felt the Scots were always in control of the scoreboard at BT Murrayfield.
The coach gave debuts off the bench to Javan Sebastian and Dylan Richardson to take to 12 the number of new players capped over the course of the four autumn Tests which saw Scotland beat Tonga, Australia and Japan but lose to South Africa.
Townsend was keen to use the matches to test his squad’s strength in depth ahead of the Six Nations, which kicks off for Scotland with a home match against England on February 5.
“In this campaign we’ve certainly introduced more players into our squad - 12 new caps which is unheard of,” said Townsend. “And we’ve seen players thrive in our environment, thrive when they’ve had the opportunity to play.
“We’ve developed further, we’ve tried to take our defensive game on, get a bit more extra out of our defence - it’s something we’re still working on. We’ve been resilient at times, today and against Australia in particular, we’ve found ways to win.
“And also we’ve got lots to improve. We’ll play teams with a similar philosophy and strength to South Africa in the Six Nations. We’ll get that in our next game, which is here against England.
“Every time you play it’s not going to be perfect but I feel that the players are working so well together. I loved the four weeks in their company and seeing them at training and off the field and we can’t wait to get them back together in a couple of months’ time.”
Scotland were once again on the wrong side of the penalty count, conceding 11 to Japan’s nine, but the outcome was not as grievous as last week’s game against the Springboks.
Townsend felt referee Brendon Pickerill’s policy of favouring the attacking team contributed to the high penalty count, which led directly to Bhatti’s sin-binning at the start of the second half for Scotland’s repeat offending at the breakdown.
“I felt it was quite a harsh yellow card,” said the coach. “We’d given away penalties early on in the game and then Japan gave a number away.
“It [the Bhatti decision] was the first penalty, not in a danger area. But we got through that period well and we got a very good maul try [through Stuart McInally] and we had an opportunity with a quick tap which didn’t work out for us and maybe we could have gone to the corner and gone back to the maul.
“We always felt in control of the scoreboard even though on the field Japan were threatening us with the ambitious and accurate attack they brought.
“It’s important we have these tests in games. Japan are a quality side and that was them back up at the level they played at the World Cup. And we need our team to go through these tests and find ways to win which we did.”