Testng.xml中的组参数问题

时间:2019-07-10 07:12:24

标签: testng

我正在创建一个testng.xml文件,以运行属于不同类别的“ Sanity”组的测试方法。类在不同的软件包下。

问题:Testng正在运行属于XML中提到的组的所有测试方法,但是执行顺序不正确,来自不同类的所有具有1的优先级都将首先运行。我们可以做些什么,以便首先运行特定类的所有测试方法,依此类推吗?

class CollectionViewCell : UICollectionViewCell {


    @IBOutlet weak var lable: UILabel!
    @IBOutlet weak var imageView: UIImageView!

}

class ViewController: UIViewController, UICollectionViewDataSource {

    let reuseIdentifier = "collectionViewCellId"
    var lableArray = ["1","2","3","4","5","6","7","8","9","10"]
    @IBOutlet weak var collectionView: UICollectionView!

    func numberOfSections(in collectionView: UICollectionView) -> Int {
        return 1
    }

    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return self.lableArray.count
    }

    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {

        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) as! CollectionViewCell
        let item = lableArray[indexPath.row]
        cell.imageView.backgroundColor = UIColor.randomColor()
        cell.lable.text = item
        return cell
    }

}

0 个答案:

没有答案