I would like to counter argue (other answers) that the Agile manifesto does clearly state something about this, namely:
Continuous attention to technical excellence and good design enhances
I really like the LeSS definition of technical excellence and it includes unit-testing and TDD. Now you can argue you might not need unit-tests and or TDD to achieve this, but it is the most common and probably advised way.
Organizational Agility is constrained by Technical Agility
In other words, when you are slow in making changes to your product, then it doesn’t matter how you structure your teams, your organization or what framework you adopt, you will be slow to respond to changes.
If you can prevent your product from resisting change in another way you might be on the right track, but:
I invented Extreme Programming to make the world safe for programmers.
– Kent Beck
Scrum lacks any technical practises, but Jeff said the following about it:
I have never seen a hyper-productive Scrum team that didn’t use
Extreme Programming development practices. – Jeff Sutherland
Quoted from this article: http://ronjeffries.com/articles/017-02ff/gathering2017/
I would expect Scrum teams without technical practises to eventually by using retrospectives come up with a similar practise. You want to be hyper-productive too, not?
The Agile fluence model, mentions it in the two star level:
Useful techniques include continuous integration, test-driven
development, pair programming, and collective ownership.
If you target only the first level of Agile fluency you could skip the practise, but any larger and longer running product should atleast try to achieve a two star level.
So the general consensus is that yes without good unit-testing, clean code and refactor practises, currently it is not possible to be truly Agile. This might change in the future as new technical practises emerge.
What do you think the answer would be if we ask some signees of the manifesto like Robert C. Martin, Martin Fowler or Kent Beck? Maybe they will say it depends, but generally it is something you should do.