1:2 Consider it to be all joy, my brothers, whenever you fall into various testings,
The word for "testings" might also be translated "temptations," and the word clearly seems to take on this nuance in 1:12. But it is hard not to distinguish the meaning here from the later meaning. 1:2 seems to be broader than temptation per se and refer to challenges to endurance in general.
As good proverbial wisdom, these words have a generally universal application. Testing is displeasurable, but it can actually make us stronger and more mature. Depending on when James was written, of course, some specific period of testing might have been in view. Paul speaks of resistance against believers in Judea (e.g., 1 Thess. 2:14). It is hard to know whether things worsened for believers in Jerusalem in the decade leading up to the Jewish War, which started in AD66.
At the same time, if James is meant to convey what James would say if he were here, rather than what he did say, then it is at least conceivable that the statement could allude to the misfortunes of Israel around AD70, namely, the destruction of Jerusalem and the temple. However, the statement really does not have any clear, concrete referent and would apply in any context.
1:3-4 ...knowing that the proving of your faith brings about endurance. And let endurance have its complete effect, with the result that you are complete and whole, lacking in nothing.
Faith here has a robust sense, unlike the shallow sense James will give the word in 2:14. Faith here is a faith that endures testing and thus is proved to be true faith. As James says later, "I will show you my faith by my works" (2:18). Do you really believe? Testing will show us.
The principle that facing resistance results in strengthening is a well known principle, especially in our age of sports training and exercise. A muscle that is not used becomes flabby and useless. Only by working the muscle does it become stronger. So testing not only shows how strong faith already is. It also strengthens it.
James 1 anticipates most of the themes that appear later in the book. The theme of testing in James largely appears in relation to the troubles brought on by the wealthy. James 2:6, for example, mentions the rich dragging the audience into court. James 4:13-5:6 also has some of the harshest words toward the rich in the New Testament.
The word for "complete" might also be translated as "perfect" or "mature." However, the word perfect is almost unintelligible to a contemporary audience, since it is inevitably taken to mean some sort of absolute perfection without any fault. The word mature similarly seems to fall short of the fullness the word seems to imply. Testing helps make a person complete to where they lack nothing and are a whole believer.